Juzzz Posted February 15, 2009 Share Posted February 15, 2009 Hello all. I am new to AutoIT and i already like it a lot but i could not find something: I want to get my ISP adres. my idea is to change my smtp from my outlook to the right smtp on my laptop when i connect to different places/networks. I want autoit to set automatic the right smtp from the right ISP from where i am connect that time. Greets, juzzz Link to comment Share on other sites More sharing options...
Chrigel Posted February 15, 2009 Share Posted February 15, 2009 Something like this: #include <INet.au3> MsgBox(0,"",_GetIP ()) Link to comment Share on other sites More sharing options...
Developers Jos Posted February 15, 2009 Developers Share Posted February 15, 2009 _GetIp() ? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
trancexx Posted February 15, 2009 Share Posted February 15, 2009 _GetIp() will only get him his public IP address. What he should do afterwards is go through RIPE database (ARIN, APNIC, LACNIC or AFRINIC depending on location) to find his provider and then extract server's domain (subdomain). Bit of this and a bit of that and he should have no problem getting desired server's name. This is, of course, all in case he's a male. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
TheXman Posted February 16, 2009 Share Posted February 16, 2009 Try this: ; Get and display WAN IP address If InetGet("http://checkip.dyndns.org", @TempDir & '\getip.out') Then $sCurrIP = StringRegExp(FileReadLine(@TempDir & '\getip.out', 1), "\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}", 2) FileDelete(@TempDir & '\getip.out') MsgBox(64, _ "GetIP", "WAN IP Address: " & $sCurrIP[0] & @CRLF & _ @crlf & _ "Local IP Address: " & @IPAddress1) Else MsgBox(16,"GetIP","Unable to retrieve WAN IP Address." & @CRLF & "Make sure you have Internet connectivity and try again.") EndIf CryptoNG UDF: Cryptography API: Next Gen jq UDF: Powerful and Flexible JSON Processor | jqPlayground: An Interactive JSON Processor Xml2Json UDF: Transform XML to JSON | HttpApi UDF: HTTP Server API | Roku Remote: Example Script About Me How To Ask Good Questions On Technical And Scientific Forums (Detailed) | How to Ask Good Technical Questions (Brief) "Any fool can know. The point is to understand." -Albert Einstein "If you think you're a big fish, it's probably because you only swim in small ponds." ~TheXman Link to comment Share on other sites More sharing options...
Juzzz Posted February 16, 2009 Author Share Posted February 16, 2009 Thanks for the fast reply.@trancexx:I live in the netherlands.@TheXman:Thanks a lot, i try it directly when i am at home.I'am now at school and they blocked it some how.. on th website http://checkip.dyndns.org i get an 145.118.X.X IP.i edit this post when i tested it at home.thanks again,Juzzz Link to comment Share on other sites More sharing options...
Juzzz Posted February 17, 2009 Author Share Posted February 17, 2009 ...i could not edit my post, i think i have no permission to do that (why..? don't ask me).--------------------------------------------------------------------------------------------------------Ok i tested it and it worked 50%..you get your WAN IP an your local IP, but i now want to get the hostname like 'xs4all' or other (don't know the hostnames in your country).How does a website resolve your IP like this website: http://whatismyipaddress.com/and then press the "Lookup IP Address" Buttonmine is: Hostname:**-***-**-***.ip.telfort.nl ISP: Green ISP B.V. Organization: Telfort Internet Proxy: None detected Type: Cable/DSL Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now