Re: FOPEN For Getting Images From Another Site

From: Date: Thu, 13 Jul 2000 15:38:40 +0000
Subject: Re: FOPEN For Getting Images From Another Site
Groups: php.general 
Request: Send a blank email to php-general+get-6463@lists.php.net to get a copy of this message
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@aeroinc.net - http://www.allegro.cc -----Original Message----- From: Matthew Leverton <matthew@aeroinc.net> >> >><? >>$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); >>?>

« previous php.general (#6463) next »