Appel des MX(Mail Exchage) d’un hôte avec la fonction ‘dns_get_mx()’

Author:


Download

<?php

    $domaine = "google.fr";
    if(dns_get_mx($domaine, $mxhosts, $weights))
    {

        foreach($mxhosts as $key => $host)
        {

            echo "Nom de domaine: $host (Weight: {$weights[$key]})<BR/>";

        }

    } else {

        echo "Aucun enregistrement Mail Exchange trouvé pour $domaine";

    }

?>

Leave a Reply

Your email address will not be published. Required fields are marked *


× 1 = one