Jump to content

Geolocation Database and API mixture


mo

Recommended Posts

I need some input on my design. I am creating a site similar to foursquare and I am working on my geo-location classes and logic.

 

Option 1: I was going to use the ipinfodb website's API to gather location data for a visitor's IP address and save the returned data in a database table. This way I could always check the table first (to avoid the API overhead) than use the API if no result was found. I figure eventually my database table will be almost 100% and the API will barely be used.

 

Option 2: My other option is the same only I start with a huge table of IP address and location data that I downloaded for free from various data gathering sites and use the API as needed to update the table with missing entries.

 

I guess both options are the same and will work the same. My main issue is that when a visitor performs a search for locations, I do not just want o show locations in their city (which I obtain from their IP). I want to show searches from nearby cities, this is where the idea to initially start off with a huge database table came from. Since I would need to have a table which contained all US cities and their nearby cities within a specific radius. This is the design that I am having trouble with. I could use the API at ws.geonames.org to get the nearby cities and build a database table as I go just like option 1.

 

 

I guess I'm just looking on some feedback on if this is the way that this is normally done or should I go another route.

Link to comment
Share on other sites

Ok. Well this is a minor issue and the visitor will be able to manually change their location. In regard to my initial question and I guess based on your feed back.  It would be a good idea to start with a master database of IP addresses by location and maintain the database when the site encounters a new IP.

 

I think I answered my own question. I will review the various free IP geolocation databases out there and build my master tables.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.