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" <[EMAIL PROTECTED]> wrote in message
000601c13d3b$3e0ba580$[EMAIL PROTECTED]">news:000601c13d3b$3e0ba580$[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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]