downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

geoip_database_info> <geoip_country_code3_by_name
[edit] Last updated: Fri, 17 May 2013

view this page in

geoip_country_name_by_name

(PECL geoip >= 0.2.0)

geoip_country_name_by_nameObtiene el nombre del país completo

Descripción

string geoip_country_name_by_name ( string $hostname )

La función geoip_country_name_by_name() devolverá el nombre del país correspondiente a un equipo o dirección IP.

Parámetros

hostname

El equipo o dirección IP del cual queremos obtener la ubicación, debe estar activo.

Valores devueltos

Devuelve el nombre del país, o FALSE si la dirección no puede ser encontrada en la base de datos.

Ejemplos

Ejemplo #1 Ejemplo de geoip_country_name_by_name()

Esto mostrará la ubicación de ejemplo.com.

<?php
$country 
geoip_country_name_by_name('www.example.com');
if (
$country) {
    echo 
'This host is located in: ' $country;
}
?>

El resultado del ejemplo sería:

 This host is located in: United States

Ver también



add a note add a note User Contributed Notes geoip_country_name_by_name - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites