Sign in to follow this  
Followers 0
scorpiox73

_GetIP Is not working like it should

28 posts in this topic

Hi all and thanks in advance for any help.

I'm new with autoit and with the help of examples and this forum i wrote a small script that runs a program every time my external ip is changed.

When i was testing it in the editor it seemed to work when i converted in exe is not (is not understanding when the ip changes).

Am i doing something wrong ?

Any help would be appreciated.

#include <Inet.au3>

$CurrentIP = _GetIP()
TrayTip("Current IP : ", $CurrentIP, 2)
Sleep(2000)

While 1

    $NewIP = _GetIP()
    TrayTip("New IP : ", $NewIP, 2)
    Sleep(2000)

   If $NewIP <> $CurrentIP Then

      TrayTip("IP Changed : ", $NewIP, 2)
      Beep(500, 2000)
      Sleep(2000)

         if ProcessExists("xxxxxxx.exe") Then
            TrayTip("Closing xxxxxx : ", "Closing xxxxxxx", 2)
            Sleep(2000)
            ProcessClose("xxxxxxx.exe")
         EndIf

   TrayTip("Waiting Time : ", "Waiting Time To Open xxxxxxx", 2)

   Sleep(10000)

    TrayTip("Opening xxxxxxxx", "Opening xxxxxxx", 2)
    Local $iPID = Run("C:\Users\Master\Desktop\xxxxxxx\xxxxxxx.exe")

        $CurrentIP = $NewIP

    EndIf

    TrayTip("Loop Waiting", "Waiting 30 Seconds...", 2)
    Sleep(30000)

WEnd

Share this post


Link to post
Share on other sites



Your code is a prime example of why I added a check of only contacting the IP discovery sites every 5 minutes. Do you want to get AutoIt banned from contacting those sites?

Before we begin with your "problem" answer this question, why do you think your external IP address will change every 30 seconds?


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Here is _GetIP function from Inet.au3.

Func _GetIP()
    Local Const $GETIP_TIMER = 300000 ; Constant for how many milliseconds between each check. This is 5 minutes.
    Local Static $hTimer = 0 ; Create a static variable to store the timer handle.
    Local Static $sLastIP = 0 ; Create a static variable to store the last IP.

    If TimerDiff($hTimer) < $GETIP_TIMER And Not $sLastIP Then ; If still in the timer and $sLastIP contains a value.
        Return SetExtended(1, $sLastIP) ; Return the last IP instead and set @extended to 1.
    EndIf

    #cs
        Additional list of possible IP disovery sites by z3r0c00l12.
        http://corz.org/ip
        http://icanhazip.com
        http://ip.appspot.com
        http://ip.eprci.net/text
        http://ip.jsontest.com/
        http://services.packetizer.com/ipaddress/?f=text
        http://whatthehellismyip.com/?ipraw
        http://wtfismyip.com/text
        http://www.networksecuritytoolkit.org/nst/tools/ip.php
        http://www.telize.com/ip
        http://www.trackip.net/ip
    #ce
    Local $aGetIPURL[] = ["http://checkip.dyndns.org", "http://www.myexternalip.com/raw", "http://bot.whatismyipaddress.com"], _
            $aReturn = 0, _
            $sReturn = ""

    For $i = 0 To UBound($aGetIPURL) - 1
        $sReturn = InetRead($aGetIPURL[$i])
        If @error Or $sReturn == "" Then ContinueLoop
        $aReturn = StringRegExp(BinaryToString($sReturn), "((?:\d{1,3}\.){3}\d{1,3})", $STR_REGEXPARRAYGLOBALMATCH) ; [\d\.]{7,15}
        If @error = 0 Then
            $sReturn = $aReturn[0]
            ExitLoop
        EndIf
        $sReturn = ""
    Next

    $hTimer = TimerInit() ; Create a new timer handle.
    $sLastIP = $sReturn ; Store this IP.
    If $sReturn == "" Then Return SetError(1, 0, -1)
    Return $sReturn
EndFunc   ;==>_GetIP

Change the constant $GETIP_TIMER = 300000 to $GETIP_TIMER = 30000

Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

JohnOne, did you not read guiness' response? 

The 5 minute delay is intentional and reasonable, otherwise the function may not work in the future at all if these sites decide to block access altogether because of autoit spamming it every 30 seconds, or even less. The most reasonable use of this function is to discover the external IP address or to test your connection, a check every 5 minutes seems like a good balance.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Your code is a prime example of why I added a check of only contacting the IP discovery sites every 5 minutes. Do you want to get AutoIt banned from contacting those sites?

Before we begin with your "problem" answer this question, why do you think your external IP address will change every 30 seconds?

 

When you are testing something you are giving 10800 seconds and then wait for 10800 secs just to see if its working ?

I guess not....

There is nothing illegal in the script the time will be running every 12 hours the my company changes my ip (EVERY 12 HOURS)

I have test it for 3 hours but is not getting the new ip change.

As you can see this is my first post so I'M A NEWBIE in autoit.

The reason of this script is "i'm running a exchange traffic program, and when my company changes ip the program stuck, so i want the script to check if my ip is changed and then close and rerun the program."

Is this script right ?

Thank you for your answer

Edited by scorpiox73

Share this post


Link to post
Share on other sites

With the greatest respect, I'm not really interested about what restrictions anyone wants to try to impose on a UDF.

If someone needs to check their IP every 30 seconds, that's their business, and if a website wants to provide that service, that's their business too, they may be here today and gone tomorrow for any number of reasons.

And is someone really cares about some internet site they'd code a udf themselves that uses a set of given sites randomly instead of hammering poor checkip.dyndns.org.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Here is _GetIP function from Inet.au3.

Func _GetIP()
    Local Const $GETIP_TIMER = 300000 ; Constant for how many milliseconds between each check. This is 5 minutes.
    Local Static $hTimer = 0 ; Create a static variable to store the timer handle.
    Local Static $sLastIP = 0 ; Create a static variable to store the last IP.

    If TimerDiff($hTimer) < $GETIP_TIMER And Not $sLastIP Then ; If still in the timer and $sLastIP contains a value.
        Return SetExtended(1, $sLastIP) ; Return the last IP instead and set @extended to 1.
    EndIf

    #cs
        Additional list of possible IP disovery sites by z3r0c00l12.
        http://corz.org/ip
        http://icanhazip.com
        http://ip.appspot.com
        http://ip.eprci.net/text
        http://ip.jsontest.com/
        http://services.packetizer.com/ipaddress/?f=text
        http://whatthehellismyip.com/?ipraw
        http://wtfismyip.com/text
        http://www.networksecuritytoolkit.org/nst/tools/ip.php
        http://www.telize.com/ip
        http://www.trackip.net/ip
    #ce
    Local $aGetIPURL[] = ["http://checkip.dyndns.org", "http://www.myexternalip.com/raw", "http://bot.whatismyipaddress.com"], _
            $aReturn = 0, _
            $sReturn = ""

    For $i = 0 To UBound($aGetIPURL) - 1
        $sReturn = InetRead($aGetIPURL[$i])
        If @error Or $sReturn == "" Then ContinueLoop
        $aReturn = StringRegExp(BinaryToString($sReturn), "((?:\d{1,3}\.){3}\d{1,3})", $STR_REGEXPARRAYGLOBALMATCH) ; [\d\.]{7,15}
        If @error = 0 Then
            $sReturn = $aReturn[0]
            ExitLoop
        EndIf
        $sReturn = ""
    Next

    $hTimer = TimerInit() ; Create a new timer handle.
    $sLastIP = $sReturn ; Store this IP.
    If $sReturn == "" Then Return SetError(1, 0, -1)
    Return $sReturn
EndFunc   ;==>_GetIP

Change the constant $GETIP_TIMER = 300000 to $GETIP_TIMER = 30000

 

So john you mean that the script is pinging a website to reveal my external ip ?

So lets say i might be banned from dyndns for checking every 30 secs

Thank you mate i will check it every 10 mins.

Edited by scorpiox73

Share this post


Link to post
Share on other sites

JohnOne, did you not read guiness' response? 

 

The 5 minute delay is intentional and reasonable, otherwise the function may not work in the future at all if these sites decide to block access altogether because of autoit spamming it every 30 seconds, or even less. The most reasonable use of this function is to discover the external IP address or to test your connection, a check every 5 minutes seems like a good balance.

Good to see someone agrees. Those that don't really need to think about what a Public IP address is and how it works.

_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

You can use this without restriction or worrying about AutoIt's "reputation" and hammering the first site.

Will be a good exercise for you to add more urls and keep them random.

MsgBox(0,0,_ExtIP())

Func _ExtIP()
    $UA = HttpSetUserAgent("Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36")
    Local $aSites2[2] = ["http://checkip.dyndns.org", "http://www.myexternalip.com/raw"]
    Local $step = 1
    Local $Ramdom = Random(0, 1, 1)

    If $Ramdom Then
        $step = -1
    EndIf

    For $i = $Ramdom To Not $Ramdom Step $step
        $sRead = BinaryToString(InetRead($aSites2[$i]))
        $aRXP = StringRegExp($sRead, "((?:\d{1,3}\.){3}\d{1,3})", 3)
        If Not @error And $aRXP[0] <> "" Then
            HttpSetUserAgent($UA)
            Return $aRXP[0]
        EndIf
    Next
    HttpSetUserAgent($UA)
    Return 0
EndFunc   ;==>_ExtIP
Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

All,

Please do not make a Trac request asking me to amend _GetIP(), I will simply reject it quicker than you can type it.


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

It is not pinging it, it's just reading the page, which shows your IP.

Put http://checkip.dyndns.org/ into your browser, what you see is what it's reading.

 

Still not working...

I changed the line ["http://checkip.dyndns.org", "http://www.myexternalip.com/raw", "http://bot.whatismyipaddress.com"] with 3 other sites that give the ip like ["http://www.myexternalip.com/raw", "http://wtfismyip.com/text", "http://bot.whatismyipaddress.com"] (dont know if i done it right) but still the same the script is not understands that i have change the ip.

If i close it and run it again it gets the new ip.

Can you understand what i'm doing wrong ?

Share this post


Link to post
Share on other sites

Did you alter the const? 

the const you mean

Local Const $GETIP_TIMER = 300000

?

if yes then i change it to see but same result i will check your function to see

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

Still not working...

........

If i close it and run it again it gets the new ip.

Can you understand what i'm doing wrong ?

 

perhaps there may be a problem related to cache

 

you also may  try with >this  :whistle:

Edited by Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Share this post


Link to post
Share on other sites
Do you want to get AutoIt banned from contacting those sites?

 

 

I'll bite.

How would they know it was AutoIt and why would they care about the script in use?  I would think they would ban an IP that abused its service (in a most automated fashion), like every other normal website admin?


,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Share this post


Link to post
Share on other sites

Simple really! Those who lack an understanding of what a header is, are likely to use the default header set in AutoIt (please don't ask me what that is, test if for yourself). So when an Admin traces the logs and sees the IP address plus header sent, yes they might ban the IP as I would do, but if they then notice "hey, look at that, there are requests from this "AutoIt" quite frequently, you know what I will just create a script to read the header and if it says AutoIt, dump the IP automatically into the ban list." Then you have a situation where every AutoIt user is automatically banned when they access the site.

Finally, those guys provide the service for FREE and all they ask in return is don't sent short frequent requests, as it's not needed. So if you want to be selfish then be my guest, just don't tarnish the AutoIt name.


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

For the record, of the three urls used in the standard UDF _GetIP().

The first which is used, is checked by every call to the udf, (http://checkip.dyndns.org) but I cannot find any restriction on the site regarding how many calls to it you can make. 

The second, (http://www.myexternalip.com/raw) limits the user to 1 call per second.

And the third, (http://bot.whatismyipaddress.com) explicitly prohibits this kind of automated use...

You may not use a script, agent, application or otherwise query this website in an automated fashion without prior written permission.

 


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

bot.whatismyipaddress.com API allows one query every 5 minutes without penalty JohnOne (link).

However, it's best not to use this function as first choice, not because of some greater good or damage to AutoIt, rather not to be brought to position that your application doesn't work correctly next day.


♡♡♡

.

eMyvnE

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