Hi,
I need to start a process on my linux server and send this process data on STDIN. This can easily be done with for instance:
...
$fp=popen('./myprogram', 'w');
...
etc.
The problem is I also need to read what this process outputs on STDOUT. Since popen is unidirectional (may only be used for reading
OR writing), I cannot get it to work! Any ideas on what I should be doing?
Can I use 'php://stdout' in any way to get this to work?
Any and all tips are welcome.
Thanks.
/Martin
PS. I could of course make this process write the output to a file using popen('./myprogram >myfile.dat', 'w'); and then read that file, but I was hoping that wasn't needed.