Hi, I'm trying to get a binary file from an URL and then save it to a local
disk.
I'm trying this:
$fd = fopen ($filename, "rb");
$contents = fread ($fd, filesize ($filename));
fclose ($fd);
$fp = fopen ($tempfile, "wb");
fwrite ($fp,$contents);
fclose ($fp);
If I use $filename="local_file" the script works great, but if I use
$filename="http://myserver.com/remote_file" the resultant local file is
empty.
How can I do this?
Thanks in advance,
Jaime
--
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]