0

How to get the computer name from IP Address using php.

Concept :

How to restrict the user with using the system information.,i don't want the IP Address with that restriction.,because it doesn't use for me.,the IP Address are not static everyday it'll changed so i want a system name or something system related.,my basic idea is i want to restrict the user with the access of only one system.,not some other.,(1 user - 1 system) with his/her login details...so this is the concept for my project...

2
  • 1
    there's a couple of different things people might call the "computer name" Commented Jun 6, 2011 at 6:00
  • 1
    The MS Windows network name or unix hostname is not necessarily the same as what the IP address resolves to. Commented Jun 6, 2011 at 6:05

1 Answer 1

1
gethostbyaddr($TheIpAddress); 

will do the trick. http://php.net/gethostbyaddr

Sign up to request clarification or add additional context in comments.

1 Comment

but in my case it returns ip address only instead of computer name

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.