$hostname = "google.com";
$ip_addrs = gethostbynamel($hostname);
if(!$ip_addrs) {
echo "Could not resolve the domain name $hostname
\n";
} else {
echo "Here is a list of IPs associated with $hostname:
\n\n";
foreach($ip_addrs as $ip) {
echo "IP: $ip
\n";
}
}
?>