gethostbynamel

(PHP 3, PHP 4 )

gethostbynamel --  Retourne la liste d'IP correspondante à un hôte.

Description

array gethostbynamel ( string hostname)

gethostbynamel() retourne la liste d'IP correspondant à l'hôte hostname.

Exemple 1. Exemple avec gethostbynamel()

<?php
  $hotes
= gethostbynamel('www.yahoo.com');
  
print_r($hotes);
?>

Le résultat du script ci-dessus sera :
Array
(
    [0] => 216.109.125.67
    [1] => 64.58.76.228
    [2] => 216.109.125.65
    [3] => 216.109.125.70
    [4] => 64.58.76.226
    [5] => 64.58.76.230
    [6] => 64.58.76.222
    [7] => 216.109.125.66
)

Voir aussi gethostbyname(), gethostbyaddr(), checkdnsrr(), getmxrr() et la page 8 du manuel.