The Little Guy Posted November 7, 2008 Share Posted November 7, 2008 Is there any way I can execute a PHP file, and save it's output to a variable, then run the output through the preg_replace() function? Link to comment https://forums.phpfreaks.com/topic/131745-execute-save-then-output/ Share on other sites More sharing options...
ratcateme Posted November 7, 2008 Share Posted November 7, 2008 you could try $output = `php file.php`; but it might be better to use cURL to http://localhost/file.php Scott. Link to comment https://forums.phpfreaks.com/topic/131745-execute-save-then-output/#findComment-684372 Share on other sites More sharing options...
The Little Guy Posted November 7, 2008 Author Share Posted November 7, 2008 I got it to almost work with cURL, but I can't get it to work with my Sessions. Link to comment https://forums.phpfreaks.com/topic/131745-execute-save-then-output/#findComment-684375 Share on other sites More sharing options...
ratcateme Posted November 7, 2008 Share Posted November 7, 2008 how about adding curl_setopt($ch, CURLOPT_COOKIE, session_name() . '=' . session_id()); Scott. Link to comment https://forums.phpfreaks.com/topic/131745-execute-save-then-output/#findComment-684382 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.