 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Rhys
Joined: 17 Apr 2007 Posts: 707 Location: Florida
|
Posted: Wed Mar 05, 2008 5:07 pm Post subject: Easily Find External IP Address |
|
|
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 |
|
 |
Oberon
Joined: 18 Feb 2008 Posts: 458
|
Posted: Wed Mar 05, 2008 5:56 pm Post subject: |
|
|
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 |
|
 |
haichen
Joined: 05 Feb 2007 Posts: 104 Location: Osnabrück, Germany
|
Posted: Wed Mar 05, 2008 8:00 pm Post subject: |
|
|
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 |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|