Re: Getting the file size, wtihout download... is this possible ?
| From: | Tamas Arpad | Date: | Wed, 26 Sep 2001 15:15:59 +0000 |
| Subject: | Re: Getting the file size, wtihout download... is this possible ? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-68879@lists.php.net to get a copy of this message | ||
Hi,
HTTP has a method called HEAD, that is for example can be used for
exmample to get the requested files' size if the other web
server/php script supplies it.
So all you have to do is to make a connection to the other web
server, give a HEAD request (it is almost the same as GET), and
parse the data that the server sends back. If there's a
Content-Lenght header...
Arpi
> AFAIAC,
> The only function that gets you image size is GetImageSize()
> which you claimed cannot do remote check. Therefore, I do not
> think you can manage this without downloading/copying the file to
> your server.
>
>> It is possible to get the filesize for couple files on other
>> server, without downloading ?
>> Probably this will be not fully resolved, but is there any way
>> >?