AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Easily Find External IP Address

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Utilities & Resources
View previous topic :: View next topic  
Author Message
Rhys



Joined: 17 Apr 2007
Posts: 707
Location: Florida

PostPosted: Wed Mar 05, 2008 5:07 pm    Post subject: Easily Find External IP Address Reply with quote

This link will return source code that is simply your external IP address:
http://whatismyip.com/automation/n09230945.asp

WhatIsMyIP.com wrote:
Some automators are hitting our home page really hard eating up a lot of bandwidth and possibly causing the site to be slow for other visitors. So we've created an automation page. This file should make it cleaner for you and easier on our bandwidth. Even though it'll be lighter on the bandwidth, please ONLY hit this page at a reasonable pace. Some of you are hitting the site at a pace of 2 times per second...that's WAY TOO often. We prefer you only hit it once per every 5 minutes, but if you need it more often than that, contact us and we can work something out.

Source
_________________
[Join IRC!]
Back to top
View user's profile Send private message
Oberon



Joined: 18 Feb 2008
Posts: 458

PostPosted: Wed Mar 05, 2008 5:56 pm    Post subject: Reply with quote

There are many services just like this such as dyndns API and geoip or hostip's geo tracking info, not to mention STUN for NAT configurations and other network procols. Most routers also display your external IP address, the advantage of using this is no limitations on refresh frequency and no bandwidth consumption beyond LAN. The following code works correctly on my Netgear DG834G official firmware:

Code:
ip_dg834(user = "admin", pass = "pass") {
   file = %A_Temp%\t%A_Now%
   UrlDownloadToFile, http://%user%:%pass%@192.168.0.1/setup.cgi?next_file=s_status.htm, %file%
   FileRead, ip, %file%
   FileDelete, %file%
   StringMid, ip, ip, pos := InStr(ip, "<b>IP Address"), InStr(ip, "</tr>", "", pos) - pos
   StringGetPos, pos, ip, >, R2
   Return, SubStr(ip, pos += 2, InStr(ip, "<", "", pos) - pos)
}
Back to top
View user's profile Send private message
haichen



Joined: 05 Feb 2007
Posts: 104
Location: Osnabrück, Germany

PostPosted: Wed Mar 05, 2008 8:00 pm    Post subject: Reply with quote

You can use also this if there is only one ip on the site:
Code:
    FoundPos := RegExMatch (ip,"([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})", ip)
    msgbox, %ip%
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Utilities & Resources All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group