RE: the real problem with the ip-to-country DB / phpweb

From: Date: Sun, 25 May 2003 14:44:39 +0000
Subject: RE: the real problem with the ip-to-country DB / phpweb
References: 1  Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-18080@lists.php.net to get a copy of this message
Hi, The 400kb file was about 95% accurate. We fixed some bugs and the file size grew quite a bit because we now have a lot of very small ranges included in the db. All these real small ranges belong to the RIPE db which covers the european region. From the statistics we have gathered from people using this data, including ourselves - the db is currently abt 98% accurate. We are working towards improving the accuracy levels on an on-going basis. We have figured out the bug which caused these overlaps. The overlapping data affects a very very small portion of the users. You may have noticed that almost all the visitors ip's are being mapped correctly since the last db update. We have already started working on the fix for this bug. - Divyank > -----Original Message----- > From: Gabor Hojtsy [mailto:gabor@hojtsy.hu] > Sent: Sunday, May 25, 2003 8:03 PM > To: Wez Furlong > Cc: webmaster@php.net; Divyank Turakhia > Subject: Re: the real problem with the ip-to-country DB / phpweb > > > > Due to my "love affair" with sqlite, I did consider this, however, > > Ilia suggested that some scheme using shared memory will be the > > fastest. > > > > If we store the database in the binary equivalent to the > format that > > you suggested, we can make some very fast lookups by incurring the > > overhead of a single PHP function call, rather than a whole > bunch of > > them and their related syscalls (fseek, fread etc. etc.). > > > > Also, implementing it in C gives us the option of perhaps > implementing > > some kind of mod_mirror for Apache, so that we can perform > intelligent > > load balancing before we even hit the PHP engine. > > OK, I am not against doing it this way. And I hope the directi data > source continues to be a reliable database for ip2country > information. > We added checks to ensure that the DB is fully downloaded and > that it is > in the proper format (20 numbers, 3 chars and \n in every > record), but > it was not in consideration that the data itself can be > incorrect. When > we started to work with ip-to-country, the db was also only > around 400k. > Now it is 1.5MB. The question is if this big size is by > error, or that > 400k DB was not covering as much IPs as this 1.5MB DB does. > It's quite > hard to beleive that 1.5MB is needed to have this data, as > the 400k DB > was said to be [nearly] complete. Divyank, can you please > comment on this? > > Goba > > > >

« previous php.mirrors (#18080) next »