Gethostbyaddr($_SERVER['REMOTE_ADDR']) php

     

Why does gethostbyaddr($_SERVER['REMOTE_ADDR']) return an IP address as opposed to a computer name as it should. It works as intended on 50 computers here in the office and returns the computer name. At the moment it returns an IP address on my own computer when it should return a computer name.


Is there a quick fix for this?

  
"
answer1
  
  

From the documentation:


  

gethostbyaddr — Get the Internet host name corresponding to a given IP address

  

The important part is Internet what PHP do is a DNS lookup. At your office your roouter may make a DNS resolve for local machines