Page 1 of 1

IP address & DNS name

Posted: Fri Aug 20, 2004 2:20 pm
by sharyn
I'm looking for a script to find an ip address and the associated DNS name. much like this : http://www.webyield.net/domainquery.html Can this be done in php? or Javascript? if not, what can I do this in? I need to be able to log visitors to my site and see where they are from.

Thanks, sharyn

Posted: Fri Aug 20, 2004 2:35 pm
by markl999
http://php.net/manual/en/function.gethostbyaddr.php
http://php.net/manual/en/function.gethostbyname.php

Also see $_SERVER['REMOTE_ADDR'] to get the IP address of the remote user.

Posted: Fri Aug 20, 2004 4:10 pm
by Joe
PHP would be the best option. From what I have learned, javascript does not hold the right resources for that.