RE: ip-to-country - summary
| From: | Divyank Turakhia | Date: | Thu, 01 May 2003 21:46:55 +0000 |
| Subject: | RE: ip-to-country - summary | ||
| References: | 1 | Groups: | php.mirrors |
| Request: | Send a blank email to php-mirrors+get-17196@lists.php.net to get a copy of this message | ||
> - 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
>
I was just thinking abt this. If an error is thrown by the script, due
to any reason whatsoever then you may end up with some real funny
results ;o). Do you want me to return a fixed string on the first line,
such as "#Directi IP-to-Country Db". This way you will always know that
you are getting the db.
> 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.
>
I could allow the whole php subnet, so that even if IP's change then
there would be no issue. Though, I will let it be for now. We are quite
ok with anyone downloading the db as such. In case we start getting more
requests than we can serve, then we may want to block it to php's subnet
only.
> 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.
>
I see no problem in this :o)
> 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.
>
Hmmm - sounds good.
- Divyank