note 103270 added to ref.geoip
| From: | nospam dot guilhem at nospam dot answeb dot net | Date: | Tue, 05 Apr 2011 09:26:27 +0000 |
| Subject: | note 103270 added to ref.geoip | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-178505@lists.php.net to get a copy of this message | ||
Hello,
While trying to update the GeoIP.dat file under debian, I've found out that automatic updates
via the geoipupdate (in geoip-bin package) is not available for the free edition. Here is a
one-liner script that will do it. You can put it in a crontab, it will download the .dat file only
if it has change :
cd /usr/share/GeoIP && wget GEOIP_URL -N && cat GeoIP.dat.gz | gzip -d >
GeoIP.dat
Note : GEOIP_URL is to be found on the page http://www.maxmind.com/app/geoip_country, under
the Binary Format section (The php note system won't allow me to put the full URL here
Crontab line could be :
@weekly cd /usr/share/GeoIP && (..)
----
Server IP: 89.31.146.176
Probable Submitter: 80.13.3.59
----
Manual Page -- http://www.php.net/manual/en/ref.geoip.php
Edit -- https://master.php.net/note/edit/103270
Del: integrated -- https://master.php.net/note/delete/103270/integrated
Del: useless -- https://master.php.net/note/delete/103270/useless
Del: bad code -- https://master.php.net/note/delete/103270/bad+code
Del: spam -- https://master.php.net/note/delete/103270/spam
Del: non-english -- https://master.php.net/note/delete/103270/non-english
Del: in docs -- https://master.php.net/note/delete/103270/in+docs
Del: other reasons-- https://master.php.net/note/delete/103270
Reject -- https://master.php.net/note/reject/103270
Search -- https://master.php.net/manage/user-notes.php