Splash 1 Posted November 12, 2009 expandcollapse popup;By Igor Ferreira Cemim ;igor.cemim at yahoo.com.br ;http://www.autoitscript.com/forum/index.php?showuser=46021 ;Search a valid IP address on a given URL. Func searchIP($URL = "http://www.ip-adress.com/") InetGet($URL, @TempDir & "\IP.dat", 1) ;Regular expression by: ;http://www.geekzilla.co.uk/view0CBFD9A7-621D-4B0C-9554-91FD48AADC77.htm $re = "\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b" $file = FileOpen(@TempDir & "\IP.dat", 0) While 1 $line = StringLower(FileReadLine($file)) If @error = -1 Then FileClose($file) FileDelete(@TempDir & "\IP.dat") ExitLoop EndIf $webIP = StringRegExpReplace($line, "[a-z]", "") $IP = StringRegExp($webIP, $re, 2) If (IsArray($IP)) Then FileClose($file) FileDelete(@TempDir & "\IP.dat") Return $IP[0] EndIf WEnd EndFunc ;Get external IP from What Is My IP Address automation page. Func getExternalIP() InetGet("http://www.whatismyip.com/automation/n09230945.asp", @TempDir & "\IP.dat", 1) $IP = FileReadLine(@TempDir & "\IP.dat", 1) FileDelete(@TempDir & "\IP.dat") Return $IP EndFunc Need more comments?! Automatic Update UDF - IP Address UDF - WinPcap AutoIt _FindDevice()[font="Verdana"][size="2"]AutoIt Spanish/Brasil/World community!!![/size][/font]Use you wanna a dot.tk domain please use my link: Share this post Link to post Share on other sites
AdmiralAlkex 126 Posted November 12, 2009 Awesome topic, five stars from me! .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Share this post Link to post Share on other sites
trancexx 1,013 Posted November 12, 2009 Liar ♡♡♡ . eMyvnE Share this post Link to post Share on other sites
AdmiralAlkex 126 Posted November 12, 2009 (edited) Whaaat? I thought all topics got awesome when YOU posted in them! (HA got you now, there's no way you can deny that!) Edited November 12, 2009 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Share this post Link to post Share on other sites
potemkin 0 Posted November 15, 2009 Good idea, nice code. Thanks for sharing. Share this post Link to post Share on other sites
ProgAndy 88 Posted November 15, 2009 (edited) The getExternalIP is already done. _GetIPBut the other func is good Edited November 15, 2009 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Share this post Link to post Share on other sites