Jump to content

Problems With Inetget()


 Share

Recommended Posts

I had little script, which was giving me my puplic IP (i'm in a little lan). It looked like this:

$status = InetGet("http://dynupdate.no-ip.com/ip.php", "ip.htm")
InetGet("http://www.no-ip.com/ip.php", "ip.htm")
$LINE = FileReadLine("ip.htm", 1)
ClipPut($LINE)
FileDelete(@ScriptDir & "\ip.htm")
IniWrite("getip.ini","Przeglad IP",@MDAY & "."& @MON & "." & @YEAR & "-" & @HOUR & ":" & @MIN, $LINE)
MsgBox(0, "Obecne IP", $LINE & @CR & "status: " & $status)

Now for some time it doesn't work. I don't remember now, but I haven't used InetGet(), but some old method which was working, now it's screwed up :think: _GetIP doesn't work either...

Edited by Bundy
Link to comment
Share on other sites

I had little script, which was giving me my puplic IP (i'm in a little lan). It looked like this:

$status = InetGet("http://dynupdate.no-ip.com/ip.php", "ip.htm")
InetGet("http://www.no-ip.com/ip.php", "ip.htm")
$LINE = FileReadLine("ip.htm", 1)
ClipPut($LINE)
FileDelete(@ScriptDir & "\ip.htm")
IniWrite("getip.ini","Przeglad IP",@MDAY & "."& @MON & "." & @YEAR & "-" & @HOUR & ":" & @MIN, $LINE)
MsgBox(0, "Obecne IP", $LINE & @CR & "status: " & $status)

Now for some time it doesn't work. I don't remember now, but I haven't used InetGet(), but some old method which was working, now it's screwed up :think: _GetIP doesn't work either...

Try this instead:

#include <Inet.au3>
$status = InetGet("http://dynupdate.no-ip.com/ip.php", "ip.htm")
$LINE = FileReadLine("ip.htm", 1)
FileDelete(@ScriptDir & "\ip.htm")
IniWrite("getip.ini","Przeglad IP",@MDAY & "."& @MON & "." & @YEAR & "-" & @HOUR & ":" & @MIN, $LINE)
MsgBox(0, "Obecne IP", $LINE & @CR & "status: " & $status)
Link to comment
Share on other sites

Try this instead:

#include <Inet.au3>
$status = InetGet("http://dynupdate.no-ip.com/ip.php", "ip.htm")
$LINE = FileReadLine("ip.htm", 1)
FileDelete(@ScriptDir & "\ip.htm")
IniWrite("getip.ini","Przeglad IP",@MDAY & "."& @MON & "." & @YEAR & "-" & @HOUR & ":" & @MIN, $LINE)
MsgBox(0, "Obecne IP", $LINE & @CR & "status: " & $status)
There is no saving page to file. But when I add it it's still the same :think:
Link to comment
Share on other sites

There is no saving page to file. But when I add it it's still the same :think:

inetget has caching on by default. If you have:

inetget(http... , filename, 1)

it will force the download every time.

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...