I'd like to save a single page automatically. The page uses javascript, and therefore I can't seem to use links, elinks, lynx, w3m or curl (I've tried them with spidermonkey but it keeps telling me to enable javascript) to do so properly, it always saves everything except the javascript rendered output. So I think the only what to do it would be in a web browser. So, say for intstance, I want to save the the main page, http://google.com and have it automatically save to my C:\google.htm. How would I do that? Is this possible? Could someone give me an example? Thanks much.
php code : <?php $recWebpage = file_get_contents('http://www.google.com/'); $filename = "google.html"; $file = fopen($filename,w); fwrite($file,$recWebpage); fclose($file); ?> Code (markup): It is also possible with an ajax request but that would only work with pages on your server .