|
-
January 7th, 2006, 04:10 PM
#1
urlfilelenght?
is there an api to learn an url's lenght?...
-
January 7th, 2006, 07:38 PM
#2
Re: urlfilelenght?
what do you mean by that??
Mike
-
January 9th, 2006, 09:42 AM
#3
Re: urlfilelenght?
when i am downloading a web page i want to show the progress.
so i think i need to knowthe lenght of the target url.
or is there a function that will show how much of the download progress is bening done???
ty yours, sincerely.
-
January 9th, 2006, 02:39 PM
#4
Re: urlfilelenght?
If you can see the raw HTTP header then look at the Content-Length: tag. This will be the number of bytes to expect AFTER the header VBCRLF+VBCRLF = header termination.
Some HTTP headers don't contain this so the only way to know if you received all the bytes is to wait for Connection-Close (socket close) in the latter case it's not possible to calculate the number of bytes you are expecting thus you cannot make a progressbar. This is why some downloads do not show %age complete.
So check for
Content-Length: xxxxxx
at the beginning of the file, then search for the crlfcrlf and count the number of bytes received AFTER this to caculate the progress.
This is all assuming you have access to raw header data. I didn't see any mention of the method used to download (Web browser control I assume?)
-
January 11th, 2006, 08:11 AM
#5
Re: urlfilelenght?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|