WxW
asked on
get size with InternetOpenUrl
How can I get the size of the document I request with InternetOpenUrl ? InternetSetFilePointer SEEK_END does not work .
Thanks
Thanks
ASKER
I already know the lower level http and ftp communication . The problem is that I don't want to embedd some kbs ( and change programming style ) to only know the size of the contents .
I saw that when opening FTP , the InternetOpenUrl gets the size using the SIZE FTP command . There must be a way.
I saw that when opening FTP , the InternetOpenUrl gets the size using the SIZE FTP command . There must be a way.
Like I said, there isn't.
Good luck with your project.
..B ekiM
Good luck with your project.
..B ekiM
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I used InternetOpenUrl with HttpQuery and it works . I know there are sites that do not return the content-length ( and what I mostly hate in the net is the failure of size information and restarting to a specific position ) . I checked the thing with EE and it won't work as chensu said . However , I do believe its a SDK bug and not an EE server bug .
>I do believe its a SDK bug and not an EE server bug.
Bug? You are such a good joker.
Bug? You are such a good joker.
You need to write your own code to use the lower-level APIs. If the file you're reading is a FTP file, you can get the file size by doing an FtpFileFind().
If the file is an HTTP resource, you _may_ be able to get the file size by querying for the "Content-Length" header.
..B ekiM