Sign in to follow this  
Followers 0
Bundy

Problems With Inetget()

8 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



maybe

#include <Inet.au3>
$PublicIP = _GetIP()
MsgBox(0, "IP Address", "Your IP Address is: " & $PublicIP)

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

As I wrote higher - it doesn't work, I get -1.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

As I wrote higher - it doesn't work, I get -1.

try it again... its working for me now

it wasn't earlier, maybe the site was down... dunno

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
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)

Share this post


Link to post
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:

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

But in those script is only status, not getting file :think: I still have no idea what to do.

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  
Followers 0