sensalim Posted March 12, 2008 Share Posted March 12, 2008 How come @IPAddress1 is not the same as if I go to www.whatismyip.com? Link to comment Share on other sites More sharing options...
Developers Jos Posted March 12, 2008 Developers Share Posted March 12, 2008 (edited) Your Thread title is misleading To answer your question: My guess is that you are connected to the Internet via a NAT router meaning that your PC's NIC has a different IP address than your Public Internet Ip address since that address is assigned to your router. Edited March 12, 2008 by 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...
sensalim Posted March 12, 2008 Author Share Posted March 12, 2008 So there is no way to get the "whatismyip" IP? Link to comment Share on other sites More sharing options...
DW1 Posted March 12, 2008 Share Posted March 12, 2008 (edited) real quick and dirty: #include <INet.au3> #include <String.au3> MsgBox(0, "from IPAddress1", @IPAddress1 ) $source = _INetGetSource( "http://whatsmyip.org" ) $IP = _StringBetween( $source, "Your IP is ", "</title>" ) MsgBox( 0, "From whatsmyip.org", $IP[0] ) I am sure there are about a hundred ways to do this better, but this is what I threw together real quick. This will get the ip address returned from the site you mentioned. EDIT: There will be ways to do this without connecting to an external site, maybe by connecting to the router, or telnet to the router... lol, or just wait for somebody that knows more than me to post where are you now Geo? Penguins? (the one time I actually want to see you correct me after I post LMAO) Edited March 12, 2008 by danwilli AutoIt3 Online Help Link to comment Share on other sites More sharing options...
sensalim Posted March 12, 2008 Author Share Posted March 12, 2008 (edited) Thanks I'll try that. I just noticed. You joined this forum 1 day before me and you already got 1022 post count - wow lol. Edit: It worked! Edited March 12, 2008 by sensalim Link to comment Share on other sites More sharing options...
herewasplato Posted March 12, 2008 Share Posted March 12, 2008 (edited) _GetIP() is included in v3.2.10.0#include <Inet.au3> $PublicIP = _GetIP() MsgBox(0, "IP Address", "Your IP Address is: " & $PublicIP)Edit: It pretty much does what danwilli wrote but it uses two sites in case one is down. Edited March 12, 2008 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
sensalim Posted March 12, 2008 Author Share Posted March 12, 2008 Thanks, that one works too. 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