Reverse Lookup of IPs Based on Domain : gethostbynamel « DNS « PHP






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";

    }

?>
  
  








Related examples in the same category

1.Retrieving All IPs Associated with a Domain