Jump to content
Sign in to follow this  
CyberSlug

InetGet problems...

Recommended Posts

CyberSlug

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!

Share this post


Link to post
Share on other sites
SlimShady

I have InetGet in a script that I run daily. And the results are always correct.

Share this post


Link to post
Share on other sites
layer

i havent even used that function yet :rollseyes: if i have, i would help :idiot:


FootbaG

Share this post


Link to post
Share on other sites
layer

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

Share this post


Link to post
Share on other sites
Jos

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 Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
layer
:idiot: so it's a bug, or am i lost? :D

FootbaG

Share this post


Link to post
Share on other sites
Valik

A little from column A and a little from column B, it would appear.

CS, I've had odd results with InetGet(). However, I can't conclusively prove it was InetGet() or my code.

Share this post


Link to post
Share on other sites
john925

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

Share this post


Link to post
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
Sign in to follow this  

×