On Jan 21, 7:31Â*am, karim <ka... (AT) discussions (DOT) microsoft.com> wrote:
Quote:
Hi,
I'm using vb08 and I'm trying to get the public ip address. I used this code
but for some reason it's not working:
Dim lblPIp As IPAddress
Â* Â* Â* Â* lblPIp = Dns.GetHostEntry(Dns.GetHostName).AddressList.GetV alue(0)
Any ideas would be appreciated. |
Hi,
That can be retrieved using a a 3rd-party IP detection web server
cınbined with WebClient object:
Using client As New System.Net.WebClient
' Get it in MsgBox
MsgBox(client.DownloadString _
("http://www.whatismyip.com/automation/n09230945.asp"))
End Using
Onur Güzel