Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Size of a Website

Status
Not open for further replies.

GMcConville

Programmer
Feb 8, 2006
6
NZ
I am using the WinInet function InternetReadFile to download a website to memory, but is there anyway of finding out the size of a website before downloading it so that you know how much memory to allocate.

Thanks
Grant McConville
 
The following seems to be useful documentation on the WinInet functions.


The function FtpGetFileSize would seem to give you what you want. But it might be simpler just to use FtpGetFile to download a website file.

When you say webiste I assume that you mean a website file. If you mean all the resources (e.g. gif files, jpg files and so on) then that is a much more complex problem. You might end up downloading half the Internet if you select a website which has lots of links!

Andrew
Hampshire, UK
 
Yep. This is a complex solution if you want to calculate the whole site.

The Indy components can calculate the size of the file you are requesting, but not the whole site.

Damne... The beers made me drunk... Heh, some spelling issues there i think... Cheers.....

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-"There is always another way to solve it, but I prefer my way.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top