 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Focused Guest
|
Posted: Sun Jun 22, 2008 1:13 am Post subject: Find out if I have a foreign IP address? |
|
|
My ISP provides me with a dynamic IP address. I live in Sweden and usually get Swedish IP addresses. But sometimes I get russan and german IP addresses. Or at least so it seems. Some applications I have warn me that I can only log in from my registered country.
I'd like to avoid those warnings. I'd like to do that by automatically reconnecting when I get a foreign IP address. Is there any easy way I can check if whether my IP address is Swedish or foreign?
Thanks |
|
| Back to top |
|
 |
Focused Guest
|
Posted: Sun Jun 22, 2008 1:24 am Post subject: |
|
|
I kind of solved this. Not the most elegant solution. If anyone knows of a better solution I'd like that. Otherwise this will work:
| Code: |
Run, firefox
Sleep, 10000
SetTitleMatchMode, 2
if(WinExist("Mozilla Firefox startsida"))
{
WinClose
}
else if (WinExist("Mozilla Firefox"))
{
WinClose
Disconnect()
}
|
|
|
| Back to top |
|
 |
Oberon
Joined: 18 Feb 2008 Posts: 458
|
Posted: Sun Jun 22, 2008 10:35 am Post subject: |
|
|
You can use free services e.g.
| Code: | file = %A_Temp%\geoip
UrlDownloadToFile, *0 http://geoip.co.uk/, %file%
FileRead, html, %file%
FileDelete, %file%
StringMid, html, html, InStr(html, "id=""mapinfo"""), 1000
RegExMatch(html, "<div class=""textright"">(?:[^:]*:){3}\s*([A-Z]{2})", country)
MsgBox, Your IP is in: %country1% |
|
|
| Back to top |
|
 |
Guest
|
Posted: Wed Aug 20, 2008 9:07 am Post subject: |
|
|
| You can also try IP Mailer. It constantly monitors your IP, and once you connect with your modem or your IP changes for some other reason, it will detect it automatically. |
|
| 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
|