On Sat, Dec 01, 2001 at 11:05:51PM +0200, faeton wrote:

> Hello Matt,
> Of course it does not, but as i've already said file() with strlen()
> can be used. :)
> MM> If you want the size of a remote file, you'll have to download it; HTTP
> MM> doesn't provide a way to query a remote file's size.  FTP does, if you have
> MM> FTP access.

Not on binary files.  For an image that's 4494 bytes, file/join/strlen gives
me 3512.  And since file() on a remote file is downloading it anyway, you
might as well do it right:

$fp = fopen('http://example.com/image.jpg','r');
while (!feof($fp))
        $image .= fread($fp,1024);
echo strlen($image);


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]

Reply via email to