gethostbynamel function

gethostbynamel function returns a list of IP addresses that a given hostname resolves to

<?php
foreach(gethostbynamel("www.google.com") as $host)
{
print("$host<br>\n");
}
?>