Description
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 1. Exemple avec gethostbyaddr()
<?php $ip = gethostbyname('www.example.com');
echo $ip; ?>
|
|
Voir aussi
gethostbyaddr() et
gethostbynamel().