RE: Error due to the "Automatic Mirror Select" function...
| From: | Jacques Marneweck | Date: | Sat, 24 May 2003 20:19:31 +0000 |
| Subject: | RE: Error due to the "Automatic Mirror Select" function... | ||
| References: | 1 | Groups: | php.mirrors |
| Request: | Send a blank email to php-mirrors+get-18039@lists.php.net to get a copy of this message | ||
Hi,
I seem to be making loads of noise in this e-Mail, so please ask if
something looks unclear ;)
I've been fiddling again with this stuff and I'm busy trying to figure
out how to compile an index that works 100% of the time rather than 8
times out of 10 for ip lookups:
root@mimbari:~/directi# php -q findsavage.php 12.235.53.226
Array
(
[0] => 12.235.53.226
)
using 12.235.53.226
directi can't locate person
I'm using the new database now which I've just downloaded and created
the index and run.
Anyway I've tried a few things which seem to return the results we want:
root@mimbari:~/directi# php -q findsavage.php 12.235.53.226
Array
(
[0] => 12.235.53.226
)
using 12.235.53.226
[DEBUG] i2c_serach_in_index returned $idx = 10
[DEBUG] $idx = 10
[DEBUG] country = NA
[DEBUG] $idx = 9
[DEBUG] country = NA
[DEBUG] $idx = 8
[DEBUG] country = USA
[DEBUG] $idx = 8
[directi] Person is located in United States
I'm no maths expert but I'm now assuming we have an index that needs to
be corrected. In certain cases where where the IP is in the class A
ranges it misses the first lookup in the index which in my mind seems to
indicate we are not building / using the indexes correctly.
root@mimbari:~/directi# php -q findsavage.php 12.2.2.2
Array
(
[0] => 12.2.2.2
)
using 12.2.2.2
[DEBUG] i2c_serach_in_index returned $idx = 9
[DEBUG] $idx = 9
[DEBUG] country = NA
[DEBUG] $idx = 8
[DEBUG] country = USA
[DEBUG] $idx = 7
[DEBUG] country = USA
[DEBUG] $idx = 7
[directi] Person is located in United States
Regards
--jm
> -----Original Message-----
> From: Rasmus Lerdorf [mailto:rasmus@lerdorf.com]
> Sent: Saturday, May 24, 2003 8:35 PM
> To: Jacques Marneweck
> Cc: Derick Rethans; Gabor Hojtsy; webmaster@php.net; Jim Winstead
> Subject: RE: Error due to the "Automatic Mirror Select" function...
>
>
> On Sat, 24 May 2003, Jacques Marneweck wrote:
> > We are using the ip-to-country stuff atm which does not
> work as well as
> > GeoIP and ip-to-nation.
>
> Like I said, querying my ip from
> http://www.ip-to-country.com/ gives me
> the correct answer, so it isn't a question of their database
> not having
> it, it has to do with our copy of the db or the way we do the query.
>
> -Rasmus
>
>