PHP gethostbynamel() Fonction
Exemple
Voici un exemple de gethostbynamel() :
<?php
$hostlist = gethostbynamel("www.formation-ti.org");
print_r($hostlist);
?> Définition et Utilisation
La fonction gethostbynamel() renvoie une liste d'adresses IPv4 pour un nom de domaine ou un hôte donné.
Syntaxe
gethostbynamel( hostname ) Valeurs des Paramètres
| Paramètre | Description |
|---|---|
| hostname | Requis. Spécifie un nom d'hôte (comme "www.formation-ti.org") |
Détails Techniques
| Valeur de Retour : | Un tableau d'adresses IPv4 en cas de succès. FALSE en cas d'échec. |
|---|---|
| Version PHP : | 4.0+ |