mieuxvivre
New member
- Joined
- Apr 6, 2012
- Messages
- 2
I searched the forums but didn't find anything much in regard to a custom php install of Maxmind's PHP geoip. I would like to install this on my Debian 6.0 64bit VPS running DirectAdmin. I want to set it up so that PHP code can call geoip information something like this:
I tried installing by doing the following:
But when I put the follow code in a file
I get the following error message:
Please let me know what I'm missing in order to make this work.
PHP:
print_r(geoip_record_by_name('php.net'));
I tried installing by doing the following:
Code:
# wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
# gunzip GeoLiteCity.dat.gz
# mkdir -v /usr/share/GeoIP
# mv -v GeoLiteCity.dat /usr/share/GeoIP/GeoIPCity.dat
# apt-get install php5-geoip
But when I put the follow code in a file
PHP:
print_r(geoip_record_by_name('php.net'));
I get the following error message:
PHP:
Fatal error: Call to undefined function geoip_record_by_name()
Please let me know what I'm missing in order to make this work.