Funkce PHP dns_get_mx().
Příklad
Vrácení podrobností o záznamech výměníku pošty (záznamy MX):
<?php
$domain="w3schools.com";
if(dns_get_mx($domain,$mx_details)){
foreach($mx_details as $key=>$value){
echo "$key =>
$value <br>";
}
}
?>
Definice a použití
Funkce dns_get_mx() je alias funkce getmxrr() .
Syntax
dns_get_mx(host, mxhosts, weight)
Hodnoty parametrů
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 |
Technické údaje
Návratová hodnota: | TRUE, pokud jsou nalezeny nějaké záznamy, FALSE v opačném případě |
---|---|
Verze PHP: | 5,0+ |
❮ Síťová reference PHP