gethostbyaddr

(PHP 3, PHP 4 )

gethostbyaddr --  Retourne le nom d'hôte correspondant à une IP

Description

string gethostbyaddr ( string ip_address)

gethostbyaddr() retourne le nom d'hôte correspondant à l'IP ip_address. Si une erreur survient, retourne ip_address.

Exemple 1. Exemple avec gethostbyaddr()

<?php
$hostname
= gethostbyaddr($_SERVER['REMOTE_ADDR']);
  
print
$hostname;
?>

Voir aussi gethostbyname().