Auto Updating GeoIP Binary Databases
January 14th, 2008Here’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
| Bookmark it del.icio.us | Reddit | Slashdot | Digg | Facebook | Technorati | Google | StumbleUpon | Window Live | Tailrank | Furl | Propeller | Yahoo |
Was this post useful to you? Let me know, buy me a beer!
Alternatively, if you're feeling impecunious, you may like to subscribe to my RSS feed, or see other articles in the Linux, PHP category.