Re: ip-to-country - summary
| From: | Gabor Hojtsy | Date: | Thu, 01 May 2003 16:36:21 +0000 |
| Subject: | Re: ip-to-country - summary | ||
| References: | 1 | Groups: | php.mirrors |
| Request: | Send a blank email to php-mirrors+get-17192@lists.php.net to get a copy of this message | ||
> Final DB Update URL:
>
>
> http://www.directi.com/iptocountry/?site=php.net&dbformat=1&lastupdate=0
>
> The last updated date of the db is : 1051660800
OK, so as the current update method now goes:
- the rsync server tries to fetch the db from the above URL
with the last modification time of the local copy provided
- if data larger then strlen("no updates") is returned,
then it is treated as the new data, otherwise the old
data file is kept
- an index is generated locally if a new data file is
saved, otherwise the old index is kept
I guess you will monitor the traffic coming in from our server. You may want
to restrict the traffic to an IP address (the IP of our server) to protect
the script from getting overloaded (by someone who reads our pulicly archived
mail messages, like this one), and return "no updates" for other IPs ;) This
will also let our script work safely in case of our IP is changed but you
protection is not modified to serve requests for our new IP address. I
probably won't know when/if our IP will change and I won't be able to inform
you, just to note that, as I am not working at the machine/network
maintanance team of php.net.
Now the ip-to-country db is fetched every hour from our IP, but results will
mostly be 'no updates', so I think there will be no problem with us updating
every hour.
BTW I have modified the indexing code since I sent it to you to write out the
granularity to the index too, so the script reading the file will find a
self-contained data file with every detail needed to search in the index.
Regards,
Goba