title: php geo ip loc does not work
body: <p><a href="http://chir.ag/projects/geoiploc/" rel="nofollow">http://chir.ag/projects/geoiploc/</a></p>
  
  <p>Hello, I am trying to set this up, but whenever I use <code>include("geoiploc.php");</code> the page is blank and whenever I remove <code>include("geoiploc.php");</code> I only see my IP address. I've uploaded geoiploc.php and index.php to a webhost that can run PHP. </p>
  
  <p>If there is ANY other easier way to show country name by IP or any other way, which is it? Please I need this fast</p>
  
  <p>So as I said, it only shows my IP whenever I remove <code>include("geoiploc.php");</code> why?</p>
  
  <p>You need this library: <a href="http://chir.ag/projects/geoiploc/autogen/geoiploc.tar.gz" rel="nofollow">http://chir.ag/projects/geoiploc/autogen/geoiploc.tar.gz</a> and this is the code to run the script:</p>
  
  <pre><code>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 . "&lt;br /&gt;";
  
    echo "Your Country is: ";
    // returns country code by default
    echo getCountryFromIP($ip);
    echo "&lt;br /&gt;\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 "&lt;br /&gt;\n";
  
    // print country abbreviation - case insensitive
    echo "Your Country Abbreviation is: ";
    echo getCountryFromIP($ip, "AbBr");
    echo "&lt;br /&gt;\n";
  
    // full name of country - spaces are trimmed
    echo "Your Country Name is: ";
    echo getCountryFromIP($ip, " NamE ");
    echo "&lt;br /&gt;\n";
  </code></pre>