
October 5th, 2005, 07:27 PM
|
|
Registered User
|
|
Join Date: Oct 2005
Posts: 1
Time spent in forums: 25 sec
Reputation Power: 0
|
|
Finding Internet Address
I'm battling to find code which can give me the Internet IP address of the computer I am on.
I have got this so far:
Code:
Dim x As System.Net.IPHostEntry = System.Net.Dns.GetHostByName(System.Net.Dns.GetHos tName)
Dim y As Array = x.AddressList;
for each ele in y
Console.WriteLine(ele)
next
If I dial up directly from my computer I get 2 ip adresses
But if I'm accessing the internet via LAN I only get my LAN IP
Basically I'm looking for the code that will always give the IP Address that the Internet sees.
Can anyone help?
|