Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/10/2015 in all areas

  1. Ok, I tested this out for you. Here is my test site: http://krydos.tk/country/ To create this site I first went to http://stevie.heliohost.org:2082/frontend/x3/module_installers/index.html?lang=php-pear to install the Net_GeoIP package. Once it is installed you will be able to find the files at /home1/thio175/php/Net/ I then copied them to the public_html/country folder to simplify my code, but I'm sure they would work fine where they were. Then I created my index.php file with the following contents: <?php require_once "Net/GeoIP.php"; $geoip = Net_GeoIP::getInstance("GeoIP.dat"); echo $geoip->lookupCountryName($_SERVER['REMOTE_ADDR']); The GeoIP.dat file I got for free from maxmind's website which is linked from the documentation of Net_GeoIP, but you can download it from my website if it's easier for you. http://krydos.tk/country/GeoIP.dat and just put that file somewhere on your account where your php script can access it.
    1 point
×
×
  • Create New...