At 16:56 19.11.2002, Michelle spoke out and said:
>I would like to download a word-document from another site and save it to my
>How would I go about doing this?
>I tried:
>$filename = ";
>$fd = fopen ($filename, "rb");
>$string = fread ($fd, filesize ($filename)); <----ERROR
>fclose ($fd);

 From the docs (

This function will not work on remote files; the file to be examined must
be accessible via the server's filesystem.

You can bypass this by reading until EOF:

$filename = '';
$fd = fopen($filename, 'rb');
$string = null;
while ($chunk = fread($fd, 64*128))    // read blocks at 64 k
   $string .= $chunk;

Untested but it should work as expected.

   >O Ernest E. Vogelsinger 
   (\) ICQ #13394035 

Reply via email to