I want to resolve a IP address but I don't get the desired result.
I want to retreive the real web name something like this: http://www.google.com
But what I get is: mad01s14-in-f6.1e100.net
Public Function IP_To_HostName(ByVal IP As String) As String
Return system.net.Dns.GetHostEntry(IP).HostName.ToString
End Function
MsgBox(IP_To_HostName("173.194.41.6")) ' One of the Google addresses
I don't know much about web protocols and this, where I'm failing?
PS: Notice I don't want to use the obsolete methods!
UPDATE:
Tried this to get "www.google.com" as string but seems that the Ip address don't have any alias... (Length of Aliases is 0, I can't understand why)
For Each a In System.Net.Dns.GetHostEntry("173.194.41.6").Aliases
MsgBox(a) ' Is empty
Next