Re: Save page

From: Date: Mon, 10 May 2004 15:51:11 +0000
Subject: Re: Save page
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-185815@lists.php.net to get a copy of this message
try something like $handle = fopen ("http://www.pagetoget.com/thispage.html", "rb"); $contents = ""; do { $data = fread($handle, 1024); if (strlen($data) == 0) { break; } $contents .= $data; } while(true); fclose ($handle); then you have all text from the .html page in $contents and you can do a fwrite on it to a local file, echo it, str_rep etc etc etc Brandon Holtsclaw brandon@netsouthern.com ----- Original Message ----- From: "Mike Mapsnac" <mikerh9@hotmail.com> To: <php-general@lists.php.net> Sent: Monday, May 10, 2004 10:37 AM Subject: [PHP] Save page > Hello > > I' m writing php script that will request page and save it locally. The page > URL will be parameter (example: > http://www.pagetoget.com/thispage.html). How > php can request such page and save it locally on the file? > > Thanks > > _________________________________________________________________ > Stop worrying about overloading your inbox - get MSN Hotmail Extra Storage! > http://join.msn.com/?pgmarket=en-us&page=hotmail/es2&ST=1/go/onm00200362ave/direct/01/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#185815) next »