Fri, 17 May 2024


How to get the host name from an IP address?

By: Peter, NetArt Media
Fri, 7 May 2021

The method listed below returns the IP associated with
a specific host name passed by a parameter.

public string getHost(string ip)
{

IPHostEntry IpEntry = Dns.GetHostByAddress(ip);
return iphostentry.HostName.ToString();
}


Category: Web Development
Share this post:



See All Scripts






Subscribe for our newsletter

Receive the latest blog posts direct in your mailbox