estoy usando este script para saber de que pais visitan mi pagina
Código PHP:
echo "tu ip es: <b>". $_SERVER["REMOTE_ADDR"]."</b> ";
//$ip ='202.164.32.81';
//$ip='66.249.73.82';
$ip =$_SERVER["REMOTE_ADDR"];
$country_query = "SELECT country_code2,country_name FROM paises ".
"WHERE IP_FROM<=inet_aton('".$ip."') ".
"AND IP_TO>=inet_aton('".$ip."') ";
// Extraigo la consulta
$country_exec = mysql_query($country_query);
// Fetching los registro dentro del array
$ccode_array=mysql_fetch_array($country_exec);
// getting the country name from the array
$country_name=$ccode_array['country_name'];
/*
$countryName = $object->GetCountryName($ip);
$pais=ucfirst(strtolower($countryName));
$flagPath = $object->ReturnFlagPath();*/
echo "<B> - Pais: </B>".ucfirst(strtolower($country_name))." ";
echo "<img src='images/flag/".ucfirst(strtolower($country_name)).".gif' height='20' width='20' border='0'>";
$pais=ucfirst(strtolower($country_name));
salu2