Justtechjobs.com Find a programming school near you






Online Campus Both


php-general | 2000071

Re: [PHP] FOPEN For Getting Images From Another Site From: Matthew Leverton (matthew <email protected>)
Date: 07/13/00

A quick follow up here that i didn't mention in my other reply...

You should still be able to use fread(), as long as you read the file in
chunks and check for eof. with feof();

while (!feof($fp))
{
    $contents .= fread($fp, BUFFER_SIZE);
}

I haven't tested this, but I think it should work as well.

--
Matthew Leverton - matthew <email protected> -
http://www.allegro.cc

-----Original Message----- From: Matthew Leverton <matthew <email protected>>

>> >><? >>$filename = "http://www.theirsite.com/graphics/imagename.jpg"; >>$fd = fopen ($filename, "r"); >>$contents = fread ($fd, filesize ($filename)); >> >>$x = filesize($filename); >>print "x = $x<BR> >>$contents"; >> >>fclose ($fd); >>?>

-- 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>