Selected from Linux Selected from PHP
- Ubuntu 17.10 Install google's mod pagespeed for apache - PHP-Ubuntu-Youtube-dl simple script for converting and downloading youtube video or mp3
- Ubuntu SSH tunnel via proxy - PHP while loop with every row with a different color
- Install GoAccess Apache Log Analyzer Tool on Ubuntu 17.10 - PHP use while loop in function
- SSHFS and map folder with a proxy - PHP List Files And Folders As links
- How to connect to SSH server with a proxy - PHP Extract Text From String
➥ Ubuntu install PHP GeoIP
Added by sonik on 02-05-2017 and keywords: php, geoip, ubuntu, install, shell, terminal, ssh, city, country, ip [ Print Article ]
Install and use PHP's GeoIP extension if you can. On ubuntu 17.10.

sudo wget
sudo gunzip GeoLiteCity.dat.gz
sudo mkdir -v /usr/share/GeoIP
sudo mv -v GeoLiteCity.dat /usr/share/GeoIP/GeoIPCity.dat

sudo apt-get install php-geoip

And here is how to use it with PHP7:

$country = geoip_country_name_by_name($ip);
echo 'The current user is located in: ' . $country;

@All rights reserved with Copyright 2018 by Sonik_Blast [ Site Map ] [ RSS ] [ YouTube Mp3 Downloader and converter ]