How to have one PHP script launch another and capture its output?
- by George Edison
This is a little tricky so bear with me:
I have a PHP script a.php that is launched from the command line and data is provided to it via STDIN
I have another PHP script b.php
I want to have a.php launch b.php and capture its output.
Also, a.php has to forward the STDIN to b.php
Is there an easy way to do this?