Ok, so here’s the thing. I need to read the output (the one that you usually see in a linux console). My biggest problem is that I don’t need to read the output of a linear execution, but something rather like wget http://ubuntu.com/jaunty.iso and show its ETA.
Also, the work-flow is the following:
S – webserver
C1 – computer1 in S’s intranet
C2 – computer 2 in S’s intranet
and so on.
User connects to S which connects to Cx then starts a wget, top or other console logging command (at user’s request). User can see the “console log” from Cx while wget downloads the specified target.
Is this plausible? Can it be done without using a server/client software?
Thanks!
You’ll want to use the php function proc_open for this — you can specify an array of pipes (stdin, which would normally be attached to the keyboard if you were on the console, std out, and stderr, both normally would be printed to the display). You can then control the input/output folw of the given program
So as an example: