Difference between local database and API lookup

Questions about hostip.info remote GET support.

Moderator: Moderators

Difference between local database and API lookup

Postby Hypherion on Wed Jul 05, 2006 2:13 am

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.
Hypherion
n00b
 
Posts: 2
Joined: Wed Jul 05, 2006 2:08 am

Postby robocoder on Wed Jul 05, 2006 6:44 am

User avatar
robocoder
Veteran
 
Posts: 105
Joined: Sat Mar 25, 2006 8:10 pm
Location: Ontario, Canada

Postby Hypherion on Wed Jul 05, 2006 11:59 am

I used rough.php because it's easier for me to parse in a script.
Hypherion
n00b
 
Posts: 2
Joined: Wed Jul 05, 2006 2:08 am

Postby robocoder on Wed Jul 05, 2006 2:22 pm

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.
User avatar
robocoder
Veteran
 
Posts: 105
Joined: Sat Mar 25, 2006 8:10 pm
Location: Ontario, Canada


Return to Hostip.info remote GET/PHP support

Who is online

Users browsing this forum: No registered users and 3 guests

cron