php-general | 2001092
Date: 09/17/01
- Next message: ---: "[PHP] R: Login in https, site in http problem"
- Previous message: _lallous: "[PHP] Re: Overriding PHP build-in functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Very simple,
you can use functions like this to copy file from an HTTP server to your
local harddrive:
function my_copyfile($src, $dest)
{
if (!$fp = fopen($src, "rb"))
return;
$fpo = fopen($dest, "wb");
while (!feof($fp))
{
$t = fread($fp, 4096);
fwrite($fpo, $t, 4096);
}
fclose($fp);
fclose($fpo);
}
in combination with the use of RegExps to parse HTML pages and extract the
filenames that you want to extract....
"Erich Kolb" <ekolb <email protected>> wrote in message
news:000601c13d3b$3e0ba580$6b01a8c0 <email protected>
> How do I download a file with PHP? I have a few hundred .xml and .rdf
files
> that I want to download on a regular basis.
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: ---: "[PHP] R: Login in https, site in http problem"
- Previous message: _lallous: "[PHP] Re: Overriding PHP build-in functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

