Quiero obtener información del cliente, como por ejemplo, su país, para redireccionar a otra página si es de España, pero se me queda pegada la página y no se porque.
Uso este script http://chir.ag/tech/download/geoiploc/
Y lo que tengo en el index.php es:
Código PHP:
   <?php 
include_once("verificaPais.php");
header('Location: pma/index.php');
?>    Código PHP:
   <?php
 
  include("geoiploc.php"); // Must include this
  // ip must be of the form "192.168.1.100"
  // you may load this from a database
  $ip = $_SERVER["REMOTE_ADDR"];
  echo "Your IP Address is: " . $ip . "<br />";
 
  echo "Your Country is: ";
  // returns country code by default
  echo getCountryFromIP($ip);
  echo "<br />\n";
 
  // optionally, you can specify the return type
  // type can be "code" (default), "abbr", "name"
 
  echo "Your Country Code is: ";
  echo getCountryFromIP($ip, "code");
  echo "<br />\n";
 
  // print country abbreviation - case insensitive
  echo "Your Country Abbreviation is: ";
  echo getCountryFromIP($ip, "AbBr");
  echo "<br />\n";
 
  // full name of country - spaces are trimmed
  echo "Your Country Name is: ";
  echo getCountryFromIP($ip, " NamE ");
  echo "<br />\n";
 
?>     
 


 
 
 
 
