<?
$fp = fopen ("/path/to/dump.html", "w");
fputs ($fp, readfile ("http://www.server.com/file.php"));
fclose ($fp);
?>
I am trying to use the code above as per
http://www.faqts.com/knowledge_base/view.phtml/aid/1196/fid/73
but the file.php is being printed when I run this page rather than written to the dump.html file. And the character string is being written to the dump.html file.
Basically, I want to grab the source code (php processed just as the browser reads it) and save it as an .html file. This will allow me to run the website off of a CD with all the PHP variables embedded in the html file.
Any help would be great.
Alex