how can I run an NSlookup through PHP
John
http://www.php.net/system
You can also try the DNS functions:
http://www.php.net/manual/en/ref.network.php
gethostbyname gethostbyaddr getmxrr checkdnsrr
I've never used them (never had to), so consult the manual for all details 🙂
-sridhar
Originally posted by theslinky You can also try the DNS functions: http://www.php.net/manual/en/ref.network.php gethostbyname gethostbyaddr getmxrr checkdnsrr
I've used the gethostbyaddr before. All you need to do is get the IP (you can get this by:
$ip=getenv("REMOTE_ADDR");
and then to find the hostname:
$hostname=gethostbyaddr($ip);