For Answers, see/post comments

Get IP address

How to get IP address of own PC using the VB.NET code ?

string myHost = System.Net.Dns.GetHostName();
string str = System.Net.Dns.GetHostByName(myHost).AddressList[0].ToString();

Public Function GetIPAddress() As String
Dim h As System.Net.IPHostEntry = System.Net.Dns.GetHostEntry(System.Net.Dns.GetHostName)
Return h.AddressList.GetValue(0).ToString
End Function

http://www.advancescripts.com/detailed/2180.html
http://aspdotnetcodebook.blogspot.com/2008/04/how-to-get-ip-address-to-countrystate.html

No comments: