<?php $hostname = "google.com"; $records = dns_get_record($hostname, DNS_ALL); echo "The domain $hostname has the following DNS records: "; foreach($records as $record) { echo "{$record['type']} "; } ?>