GeoIP

Install/Setup GeoIP:

wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz      
gunzip GeoLiteCity.dat.gz        
sudo mkdir -v /usr/share/GeoIP       
sudo mv -v GeoLiteCity.dat /usr/share/GeoIP/GeoIPCity.dat        

For PHP5:

sudo apt-get install php5-geoip

For PHP7:

sudo apt-get install php-geoip

Let’s test GeoIP:
Add following lines in php

print_r (geoip_db_get_all_info());      
var_dump(geoip_record_by_name($_SERVER['REMOTE_ADDR']));         
var_dump(geoip_record_by_name('www.example.com'));       

Discuss your project
with our experts

No obligation. Limited slots.

Contact Form Business Enquiry

"*" indicates required fields

Please attach any RFP, project specification, or document that you would like to share.
Drop files here or
Max. file size: 5 GB.
    This field is for validation purposes and should be left unchanged.