Forum Moderators: coopster

Message Too Old, No Replies

Source code

saving html output

         

WhosAWhata

1:06 am on Dec 4, 2003 (gmt 0)

10+ Year Member



how do you save the html output of a webpage that is not on your server?
the url would be like [site.com...] or [site.com...]

NO FILE EXTENTIONS on the external site (MySQL thing I think)

brotherhood of LAN

1:12 am on Dec 4, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You might want to download CURL, sorry to anyone who's read me say that 1000 times ;)

You can run it from the command line, this would work-

curl -o savedfile.whatever [pageyouwant.com<...]

type in curl -help for the full range of options.

WhosAWhata

2:58 am on Dec 4, 2003 (gmt 0)

10+ Year Member



it doesn't seem to work for me...this is the code i tried

<?
$pathtocurl = "/usr/local/bin/curl";
exec("$pathtocurl -o saved.html [othersite.com...]
?>

brotherhood of LAN

3:08 am on Dec 4, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Check out the post in your other thread [webmasterworld.com...]

When using it in exec(); (which is more or less teh command line) it won't return anything if you have the wrong path to curl or the server couldnt be reached.