Jump to content

@IPAddress1 is incorrect


Recommended Posts

  • Developers

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 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

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 by danwilli
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...