IF you have access to the CGI version of PHP you could use the EXEC function
you could do something like:
exec("php other_script.php",$result_array);
This will run the command "php other_script.php" and capture all
outpur line by line, into the $result_array.
Then you can write the array line by line to a new file or whatever.
I know you are new and that it is probably the last thing you feel like doing,
but.... read the manual. :-)