Execute long command in php without being blocked

I want to run a shell command in PHP but that command takes a while to be performed. So i want it to run in the background but I also want the user to be informed of what is going on. The shell command I am using outputs text describing what it's doing. My question: How can I execute that shell command in the background from my Browser and still have all the verbose from that command being written to my webpage as the command is running ?

Answers


You can use popen and then read from the process' output stream and write to the response.


Need Your Help

How to automatically start a C# WebService?

.net wcf web-services windows-services

I have written a C# WebService. The problem is that after I publish it to IIS it won't automatically start unless any of its methods is called. This is very frustrating because this WebService has to