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