Jump to content

InetGetSize function works differing


Recommended Posts

Hello Programmers,

I have a problem with the InetGetSize function:

$FileInternetMain="http://imdb.com/"

$SizeOfFileInternetMain=InetGetSize($FileInternetMain)

MsgBox(0,"SizeOfFileInternetMain","*" & $SizeOfFileInternetMain & "*")

The size is always 0 bytes!

It seems this code doesn't work.

But this following code work fine:

$FileInternetMain="http://i.imdb.com/images/nb15/logo.gif"

$SizeOfFileInternetMain=InetGetSize($FileInternetMain)

MsgBox(0,"SizeOfFileInternetMain","*" & $SizeOfFileInternetMain & "*")

The size is 5596 bytes.

How can I determine the size from "http://imdb.com/" correctly?

Link to comment
Share on other sites

  • Moderators

Returns the size (in bytes) of a file located on the internet.

I don't think it says anything about "directories" there.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Yeah, the problem is you have given it a directory. Whereas in the second example it has been given a file.

You could perhaps try an InetGetSource() and save the source.. but that is not going to get you the sizes of all images etc. Just the size of the html code that is produced.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...