Thursday, September 22, 2005

How to get the host name from an IP address?

public string getHost(string ip)
{
IPHostEntry IpEntry = Dns.GetHostByAddress(ip);
return iphostentry.HostName.ToString();
}

No comments: