How to find process id from external command and use it for "Loading" page

Started by abcdf, 10-24-2011, 20:48:59

Previous topic - Next topic

abcdfTopic starter

Hello!
I am executing an external command from a PHP script, using the exec function. Since this program can take more than 1-2 minutes to run, I thought I should use a "Loading page...please wait". What I need is to be able to get the process id from the external program that is being run and, when this finishes, I'll start outputting the results.

Is there a way to do this?


seo-webservices

Hi,

for loader better use jquery:

put a div on your page:
<div id="loader">any image or content you want</div>

On css:
#loader{ position: absolute; background-color: rgba(0, 0, 0, 0.9); width: 100%; height: 100%; top: 0; left: 0; z-index: 1500; }

For Jquery:

$(window).load(function() { 
  $("#loader").effect("clip",1500);


I hope this will helping you
})
  •  


damponting44

A very common question we see here at Bleeping Computer involves people concerned that there are too many SVCHOST.EXE processes running on their computer.

Lishmalinyjames

Try to work with proc_open().
Then you can get information about your process using proc_get_status.