lan - Find hostname of device on local network with PHP -


i'm trying determine hostname of devices on network store show more human information users source file unfortunately doesn't contain (and dynamic need maintain info elsewhere), built in php function gethostbyaddr() doesn't work.

for example, have device @ 10.0.60.1 hostname phone-chris (i don't care domain portion, hostname itself).

when use:

<?php     $hostname = gethostbyaddr("10.0.60.1");     echo "$hostname"; ?> 

it returns ip address (which indicates lookup failed). if change 8.8.8.8, works expected , show google-public-dns-a.google.com. impression function won't want seems rely on reverse lookups.

how can determine hosename of device on network can store information in manner? (i.e., return phone-chris).

this has reverse dns lookups... aren't going love on 1 php masses. situation work can tell 1 client , webserver share same dns server.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -