In PHP I need to be able to execute another script from inside another
and catch the output. How do I do this? The require() and include()
functions will execute a script, but it sends the output to the
browser, I don't want this. I need to be able to catch the output and
store it in a file or perform logic on it.
I've tried doing fopen and hitting the script that way, but the problem
is that doing this kills the session state as if I were a 3rd party
user accessing the system. Any ideas?