gethostbynamel

(PHP 4, PHP 5)

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 . Retourne FALSE si hostname ne peut être résolu.

Exemple 1749. Exemple avec gethostbynamel()

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

L'exemple ci-dessus va afficher :


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()
the named(8) manual page