Trouver le nom de domaine d’une adresse IP distante

Author:


Download

<?php

    $nom_domaine = gethostbyaddr($_SERVER['REMOTE_ADDR']);

    if($nom_domaine == $_SERVER['REMOTE_ADDR'])
    {

        echo "Nom de domaine introuvable.";

    } else {

        echo "Voici le nom de domaine: $nom_domaine";

    }
?>

Leave a Reply

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


five + = 7