> echo gethostbyaddr("ip.number.inserted.here"); > > returns the name of the server when it`s an internet address. > Is there a similar command that will return host names on a local > network.... > > I tried using the above command putting in a LAN address, but it just > returned the IP address.....
This isn't a PHP issue, this is a DNS issue. "gethostbyaddr" uses DNS resolution to convert the IP address into its named equivelant... if no name is found, it will return the IP address again. The only way to get the reverse DNS for a private (LAN) IP address is to use a DNS server which has those IPs registered. In short, you have to run your own domain name server and apply the entries in there. There are other, OS independant, ways of adding these lookups (eg: /etc/hosts on Unix %SYSTEMROOT%\system32\hosts.pam (I think) on Windows 2000+) but you will have to investigate those yourself. -- Dan Hardiker [EMAIL PROTECTED] ADAM Software & Systems Engineer First Creative -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php