Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

A Number of Questions...

Ok...

I am making a DLL that makes downloading files from the net easier and im using the INet control. Is there any way to find out the size of the file on the net? At the moment I use the OpenURL() function and retrieve the file as a byte, but how do find out how big the file is, before it is downloaded? I want to know this so I can make a progress bar, (eg. amount aquired, percentage downloaded etc.)

Secondly, does anybody know how to find out runescape stats using VB?! I know it is possible to retrieve someone's stats, but how do you do this? I don't mean using a site like RSBANDB.com or runehq.com and having them make a stats signature for you to use, I mean pinging or doing something somehow to find out your stats.

Any help on these questions is greaetly appreciated :)

mEo
[840 byte] By [mikesena] at [2007-11-11 6:55:06]
# 1 Re: A Number of Questions...
How are you downloading the files? If the files are on an FTP server, you can issue a DIR command to get a directory listing, which includes the file size(s). If they're on an HTTP server, issue a HEAD command and check the returned Content-Length value.
Phil Weber at 2007-11-11 17:27:39 >
# 2 Re: A Number of Questions...
I am using INet control. How do you issue the HEAD command?
mikesena at 2007-11-11 17:28:39 >
# 3 Re: A Number of Questions...
You may not be able to do it with the Inet control. See if this helps: http://www.vbip.com/wininet/wininet_webchecker.asp
Phil Weber at 2007-11-11 17:29:48 >
# 4 Re: A Number of Questions...
It does in a way...

The example they give doesn't work when I try to configure it to download a file though
mikesena at 2007-11-11 17:30:43 >