Using system() and bringing back the results

Posted on 16th Feb 2014 by admin

I am aware that you can use system() within PHP to execute system commands, but I was wondering if there was a reasonable way to bring back the results every second.

For example, I want a web based interface to put some files in a RAR archive. It would need to execute a command on the server (CentOS 5) to use rar. When you use that command, there is a progress bar that gets drawn in the console window with the progress of the RAR'ing, much like wget.

I'm wondering if there is a way to somehow grab that progress bar and put it out on the page so I can see how far along the RAR has gone.

Thanks

Other php-forum