Maxmind PHP Geoip

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:

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.
 
Maxmind PHP Geoip DirectAdmin

Thank you for your quick response but I need more specific direction than that. Could you please take a moment explain things step by step how to make it work? Thanks
 
This isn't a Maxmind or Geoip forum. Wouldn't one of those be a better place to get support on a separate product?

Jeff
 
Back
Top