xwinterx Posted June 7, 2006 Share Posted June 7, 2006 Hiya, I am not going to be able to test InetGetSize() for a while, but do not want to interrupt coding too much so I thought I'd ask on here. I want to check the size of a file located on a webserver using the following code: Global $Size Global $url = "www.... yadda yadda.../something.html" $Size = InetGetSize($url) If $Size<> (my target size in bytes) Then Msgbox(4096, "Error!", "Filesize is incorrect or missing... yadda...") Exit EndIf Basically I want to use this as a control for running one of my scripts. So I want to get the size of the remote file so someone can use the program. When I want that someone to no longer be able to use the program, I will remove or change the filesize of my target file. I believe this will work. Does it actually download this file to get its size or does it get the size without download? Thanks for any help! Link to comment Share on other sites More sharing options...
Emperor Posted June 7, 2006 Share Posted June 7, 2006 I am pretty sure it gets the file size only without downloading the file. Link to comment Share on other sites More sharing options...
Confuzzled Posted June 11, 2006 Share Posted June 11, 2006 It doesn't download to get the file size.Try getting the file size on a multi-megabyte file while on dialup and you will agree!One issue: If you don't have a live connection, but have RAS set for autodial, and the RAS screen is stuck waiting for a password or line connection, the AutoIT script stops indefinitely until the RAS screen is actioned - I'm not sure if this is a Windows issue or one with AutoIT. Link to comment Share on other sites More sharing options...
nfwu Posted June 11, 2006 Share Posted June 11, 2006 multi-megabyte fileNah, our recent hack-attack competition is a very good example.(File size of approx. 1.5GB if i remember correctly)#) TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
xwinterx Posted June 12, 2006 Author Share Posted June 12, 2006 Thanks... belated reply... but thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now