Manuel PHP

gethostbyaddr

(PHP 4, PHP 5)

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 .

Example#1 Exemple avec gethostbyaddr()

  1. <?php
  2. $hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);  
  3.  
  4. echo $hostname;  
  5. ?> 

L'éditeur javascript - CSS - Gentoo - Tutoriaux PHP - Tutoriels PHP - Php - Breizh Blog