Mega Code Archive

 
Categories / Php / DNS
 

Reverse Lookup of IPs Based on Domain

<?php     $ip_addr = gethostbyname("www.google.com");     if($ip_addr ==="www.google.com") {         echo "Could not resolve the IP address for the host!<BR/>\n";     } else {         echo "The IP address for the host is: $ip_addr<BR/>\n";     } ?>