Update GeoIP.dat automatically
9 June 2009
No Comment
Some of you will use GeoIP for geotargeting (a tutorial about this will follow).
One of the few things you’d have to manually if there was no cronjob, is to update the GeoIP.dat regularly.
Put this little sh script into cron.daily and it will be updated automatically:
#!/bin/bash UNGZIPPED_FILE=GeoIP.dat GZIP_FILE=GeoIP.dat.gz REMOTE_PATH=http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/ LOCAL_PATH=/tmp/ LOCAL_FINAL_PATH=/www/vhtdocs/geo_ip/ #update this to your directory of choice cd $LOCAL_PATH wget -N -q $REMOTE_PATH$GZIP_FILE gunzip $GZIP_FILE cp -f $UNGZIPPED_FILE $LOCAL_FINAL_PATH$UNGZIPPED_FILE exit
Like our posts? Then subscribe via Mail:
Similar Posts:
- Move Wordpress Blog To A New Host Or Domain
- Apache “Under Construction” with exceptions
- Hide Folder Directory
- Word to Wordpress – Copy & Paste Text from Word to Wordpress
- Cpanel POP3 Login Issues via Thunderbird, Outlook, etc
Socialize:
|
|











Leave your response!