$domainname = "microsoft.com";
$ips = gethostbynamel($domainname);
if(!$ips) {
echo "domain name not found";
} else {
foreach ($ips as $ip)
echo "IP: $ip<br />";
}
/*
run:
IP: 104.40.211.35
IP: 191.239.213.197
IP: 23.100.122.175
IP: 104.43.195.251
IP: 23.96.52.53
*/