PHP/DNS/dns get mx — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Версия 13:37, 26 мая 2010
Using the dns_get_mx() Function
<source lang="html4strict">
<?php
$hostname = "google.ru"; if(dns_get_mx($hostname, $mxhosts, $weights)) { foreach($mxhosts as $key => $host) { echo "Hostname: $host (Weight: {$weights[$key]}
\n"; } } else { echo "Could not find any MX records for $hostname\n"; }
?>
</source>