gethostbyaddr

(PHP 3, PHP 4, PHP 5)

gethostbyaddr --  Obtener el nombre del host de Internet correspondiente a una dirección IP dada

Descripción

string gethostbyaddr ( string direccion_ip )

Devuelve el nombre del host de Internet especificado por direccion_ip o una cadena que contiene el valor direccion_ip sin modificar si la función falla.

Ejemplo 1. Un ejemplo sencillo de gethostbyaddr()

<?php
$nombre_host
= gethostbyaddr($_SERVER['REMOTE_ADDR']);

echo
$nombre_host;
?>

Vea también gethostbyname(), y gethostbynamel().