note 7659 added to filesize
| From: | noper at php2 dot chek dot com | Date: | Thu, 10 Aug 2000 13:25:05 +0000 |
| Subject: | note 7659 added to filesize | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-774@lists.php.net to get a copy of this message | ||
This might help for filesize on a remote server.. from faqts.com
<pre>
Loop using fread and check for eof with a predefined buffersize (example using 1000 bytes buffer)
$fp = fopen ($picture_name, "r");
while (!feof($fp))
{
$contents .= fread($fp, 1000);
}
fclose($fp);
print "filseize: " . strlen($contents) . "<br>";
$fp2 = fopen ("c:/temp/test.gif","w");
fwrite($fp2,$contents,strlen($contents));
fclose($fp2);
</pre>
http://www.php.net/manual/function.filesize.php