Page 1 of 1

Difference between local database and API lookup

PostPosted: Wed Jul 05, 2006 2:13 am
by Hypherion
Hi there,
It seems that when I do a lookup for lat/long on a number of IP's, I get a lot more results from the php API than extracting them from an rsynced CSV database. (yes I do use the class C long IP number format when searching on db). Anyone know what is the reason behind this? I would like to use the local database so as to not put too much load on the API site, but it seems that at most 60% of API records are available in the csv file.

PostPosted: Wed Jul 05, 2006 6:44 am
by robocoder

PostPosted: Wed Jul 05, 2006 11:59 am
by Hypherion
I used rough.php because it's easier for me to parse in a script.

PostPosted: Wed Jul 05, 2006 2:22 pm
by robocoder
rough.php is more than a database lookup. It employs a guess when the corresponding /24 doesn't have a city assigned. Essentially, the guess looks at (most) 16 adjacent /24 blocks ... expanding the lookup from a /24 to a /20.

Let's say, 192.168.10.2 doesn't have a city assigned. The corresponding /24 is 192.168.10.0 to 192.168.10.255. rough.php would expand the search from 192.168.2.0 to 192.168.18.255.