Hello,
I am working in an environment with more than 175 pcs connected with thru LAN. I want to write a script which gives me output like name of host and its IP. Can any one suggest me how to solve this problem ?
With Thanks ! prashant
You mean you want to scan the entire network and gather a list of hostnames and IP's? Or you just want to retrieve the hostname and IP of the computer visiting the script?
Assuming your network admin has configured reverse DNS correctly, using gethostbyaddr should work.
Talk to your network admin.
Mark