PHP/DNS/dns get record
Use dns_get_record() to get the DNS information associated with the hostname www.php.net.
<source lang="html4strict">
<?php $record = dns_get_record("www.php.net"); print_r($record); ?>
</source>
Using the dns_get_record() Function
<source lang="html4strict">
<?php
$hostname = "google.ru"; $records = dns_get_record($hostname, DNS_ALL); echo "The domain $hostname has the following DNS records: "; foreach($records as $record) { echo "{$record["type"]} "; }
?>
</source>