8.83.17 gethostbyname()
Retourne l'adresse IP correspondant à un hôte
[ Exemples avec gethostbyname ] PHP 3, PHP 4, PHP 5
string
gethostbyname (
string
hostname
)
gethostbyname
retourne l'adresse IP
correspondant à l'hôte
hostname
ou une chaîne
correspondant à
hostname
en cas d'erreur.
Exemple avec gethostbyaddr |
<?php $ip = gethostbyname('www.example.com');
echo $ip; ?>
|
Voir aussi
gethostbyaddr
et
gethostbynamel
.
|