an equivalent script.
Thanks
Luiz
At 07:23 PM 12/3/2002 +0000, you wrote:
----- Original Message ----- From: "Howdy-Tzi" <[EMAIL PROTECTED]> > > > the thing is: > > How can I get the 'BYTESTOTAL' information of a file WITHOUT having to > > download or preload this file? > > I don't believe you can. In order to find out about the file, you've > got to touch it in some way or another. I could be wrong but I think > you're stuck with that. :\HTTP includes no method to query the size of a file. Plus, some files will return a content-length header, and some won't, so bytesTotal is unreliable at best. Probably the best workaround is a little PHP script; something like this: <? fname = $HTTP_GET_VARS[ 'f' ]; echo filesize( fname ); ?> Then do getNetText( "getsize.php?f=images/bigimage.jpg" ), etc. You could, of course, extend this simple script to query the size of more than one file in one go, which would be a good idea if you want to load several files since the TCP/IP connection overhead will far outweigh the download time for a tiny script like this. - Robert
[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]