Jump to content

InetGet problems...


 Share

Recommended Posts

I'm having trouble with InetGet ( "URL", "filename" [, reload [, background]] )

I have a file that is updated every 15 seconds or so. I use the reload argument of 1, but I sometimes pull an old version of the file...

Whenever I reload the page in Firefox, I always get the newest version.... so that seems to rule out caching on the network side of things....

Here's the idea behind the code.... I use InetGetSize in order to determine when the file is updated (because I didn't see any InetGetTime....)

; assume that $URL and $LOCAL are defined
While 1

      $size = InetGetSize($URL)
      If $size <> $previousSize Then
         $previousSize = $size
      EndIf
      FileDelete($LOCAL)
      InetGet($URL, $LOCAL, 1);opt force reload
$info = FileReadLine($LOCAL, 2)
TrayTip("example", $info, 5)
sleep(1000)
WEnd
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

  • Developers

Has anyone else seen weird behavior with InetGet?

<{POST_SNAPBACK}>

just a long shot... Is the FileDelete($LOCAL) successful ?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

is the html doc on your computer, not the internet? because isn't it when your html doc is on your computer, that's really WindowsExplorer right? thats why you can always view a web page saved on your computer

EDIT: "Downloads a file from the internet using the http or ftp protocol."

so im assuming the page has to be on the internet, not windows explorer... so if it is on your computer, not the actual internet, that could be the problem./

Edited by layer
FootbaG
Link to comment
Share on other sites

  • Developers

is the html doc on your computer, not the internet? because isn't it when your html doc is on your computer, that's really WindowsExplorer right? thats why you can always view a web page saved on your computer

EDIT: "Downloads a file from the internet using the http or ftp protocol."

so im assuming the page has to be on the internet, not windows explorer... so if it is on your computer, not the actual internet, that could be the problem./

<{POST_SNAPBACK}>

I am not sure if you really agreed with yourself here and if your came to a conclusion.. :idiot: , but

It is irrelevant if the server is on the INTERNET or located on LOCALHOST/127.0.0.1 . The issue reported is that the InetGet() doesn't always download the latest available from the webserver.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

I'm using INetGetSize() and INetGet() on a twice daily basis to test for version updates (i.e. file size changes) and download new file versions as they become available. It may make a difference that the files I'm working with are all binary. In any case my downloads have been very reliable in the sense being discussed here. I have had INetGet() lock up indefinitely when it can connect to the server but doesn't have correct permissions to download the file.

edit: fixed spelling errors

edit #2: I'm fairly certain the problem is permissions but not 100% certain.

Edited by john925
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...