Auto Updating GeoIP Binary Databases
Posted on January 14, 2008
Here's how I keep on top of updating the GeoIP binary databases used by various scripts and applications I use.
I have a script called /usr/local/sbin/geoip-update
#!/bin/sh cd /usr/local/share-php wget -q http://www.maxmind.com/download/geoip/database/GeoIP.dat.gz wget -q http://www.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz gzip -d -f GeoIP.dat.gz gzip -d -f GeoLiteCity.dat.gz rm -rf http://www.maxmind.com/download/geoip/database/GeoIP.dat.gz rm -rf http://www.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
It runs every month from cron, like this
30 22 2 * * /usr/local/sbin/geoip-update
Related posts:
- City & Country Location Finding with GeoIP
Following on from a previous post, "PHP Geo-IP Location in 4 lines", I've had a... - mod_geoip Revisted including stopping spam in phpBB 2
I've recently moved a client's forum onto a new cPanel server, previously it was on... - PHP Geo-IP Location in 4 lines
Want to look up IP addresses to a geographical location? Firstly, download maxmind_geoip.php and GeoIP... - Apache2 mod_deflate
The mod_deflate module provides the DEFLATE output filter that allows output from your server to... - Enabling mod_deflate/gzip globally on cPanel
There's far too many reasons to mention why you should enable mod_deflate to gzip your...
April 6th, 2009 - 22:08
The address for the GeoIP.dat.gz has changed to:
http://www.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
and the two “rm ….” lines can be removed as the two previous “gzip -d -f …” cause the gz files to be removed automagically.
tks,