Getting hostname

I have an application in which I try to get the host name of the visitor. In Asp.Net there's a function to do that.
Like 50% of the IP are resolved, but like other half don't.
Some of the IPs that fail, are resolved in my development machine.
Also, I tried some resolved IPs and are not resolved in my development machine
Where/How are these IPs resolved ?

P.S the asp.net function goes like this:
PHP:
        private string getHostName(string ip)
        {
            IPHostEntry IpEntry = Dns.GetHostEntry(ip);
            return IpEntry.HostName.ToString();
        }
 
Back
Top