Funkcja PHP dns_get_mx()
Przykład
Zwróć szczegóły rekordów wymiany poczty (rekordy MX):
<?php
$domain="w3schools.com";
if(dns_get_mx($domain,$mx_details)){
foreach($mx_details as $key=>$value){
echo "$key =>
$value <br>";
}
}
?>
Definicja i użycie
Funkcja dns_get_mx() jest aliasem funkcji getmxrr() .
Składnia
dns_get_mx(host, mxhosts, weight)
Wartości parametrów
Parameter | Description |
---|---|
host | Required. Specifies the host name |
mxhosts | Required. An array that specifies a list of MX records found |
weight | Optional. An array that specifies the weight information gathered |
Szczegóły techniczne
Wartość zwrotu: | TRUE, jeśli zostaną znalezione jakiekolwiek rekordy, FALSE w przeciwnym razie |
---|---|
Wersja PHP: | 5.0+ |
❮ Informacje o sieci PHP