Halaman

Selasa, 11 Februari 2014

Install GeoIP Apache module

This module allows you to determine which country, region, city, postal code, area code the visitor is coming from.
1. Install the module
apt-get install libapache2-mod-geoip
2. Restart Apache
/etc/init.d/apache2 restart
3. Create a new PHP file to test the module (pico /var/www/test.php or any file you can access on your server)
<?php
print_r($_SERVER);
?>
4. Navigate to the new file in a web browser (http://yourserver/test.php)
The response will be something like this:
Array
(
[GEOIP_COUNTRY_CODE] => GB
[GEOIP_COUNTRY_NAME] => United Kingdom
...
)

Tidak ada komentar:

Posting Komentar