>I need to obtain the filesize of a file thats not on the same server. As[color=blue]
>filesize() need a realpath and not a url how else can this be done?[/color]
Fetch the file and look at the size of it?
How *can* you access this file? Some FTP servers will provide the
file size if you ask them nicely. HTTP doesn't (unless you get the
file too). And if it's dynamic content, it might be a different
size every time you fetch it.
[color=blue][color=green]
> >I need to obtain the filesize of a file thats not on the same server. As
> >filesize() need a realpath and not a url how else can this be done?[/color]
>
> Fetch the file and look at the size of it?
>
> How *can* you access this file? Some FTP servers will provide the
> file size if you ask them nicely. HTTP doesn't (unless you get the
> file too). And if it's dynamic content, it might be a different
> size every time you fetch it.[/color]
Hmm, could you make a HEAD request? That has a content size header,
although I don't know if you'd have to factor in the size of the header
itself and whether any encoding is used.
Steve wrote:[color=blue]
> Hmm, could you make a HEAD request? That has a content size header,
> although I don't know if you'd have to factor in the size of the
> header itself and whether any encoding is used.
>[/color]
Comment