note 10708 deleted from function.fopen by sander
| From: | sander@php.net | Date: | Sun, 07 Apr 2002 11:11:22 +0000 |
| Subject: | note 10708 deleted from function.fopen by sander | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-28822@lists.php.net to get a copy of this message | ||
I've tryed to copy a file located somewhere in the web to a local destination; It works quite
well, but is there a faster method for that??
Here's my example:
$handle = fopen ($WebFile, "r");
$outhandle=fopen ($LocalFile,"w");
while (!feof($handle)) {
$buffer=fread($handle,4096);
fputs($outhandle,$buffer);
}
fclose($handle);
fclose($outhandle);