PHP dns_get_mx() Functie
Voorbeeld
Retourgegevens van e-mailwisselaarrecords (MX-records):
<?php
$domain="w3schools.com";
if(dns_get_mx($domain,$mx_details)){
foreach($mx_details as $key=>$value){
echo "$key =>
$value <br>";
}
}
?>
Definitie en gebruik
De functie dns_get_mx() is een alias van de functie getmxrr() .
Syntaxis
dns_get_mx(host, mxhosts, weight)
Parameterwaarden
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 |
Technische details
Winstwaarde: | TRUE als er records worden gevonden, anders FALSE |
---|---|
PHP-versie: | 5.0+ |
❮ PHP-netwerkreferentie