GeoIp diegimas
Diegiame mod_geoip:
install libapache2-mod-geoip
koreguojame /etc/apache2/mods-available/geoip.conf:
nano /etc/apache2/mods-available/geoip.conf
ir atkomenduojame eilute:
<IfModule mod_geoip.c> GeoIPEnable On GeoIPDBFile /usr/share/GeoIP/GeoIP.dat </IfModule>
diegiame:
apt-get install php5-geoip
restartuojame:
/etc/init.d/apache2 restart
Tikriname, į serverį patalpiname tokio turinio failą:
<html> <body> <?php $country_name = apache_note("GEOIP_COUNTRY_NAME"); print "Country: " . $country_name; ?> </body> </html>
Naujus GeoIP.dat failus siunčiame iš čia: http://www.maxmind.com/app/geolitecountry