An open API service indexing awesome lists of open source software.

https://github.com/dkam/locate_by_ip

Small web app to serving location based on IP address
https://github.com/dkam/locate_by_ip

Last synced: 2 months ago
JSON representation

Small web app to serving location based on IP address

Awesome Lists containing this project

README

        

Locate By IP is a simple little Sinatra app. You put the IP address you want to locate in the URL and it returns the location via XML

dkam@Omena ~/Development/ip_location (master) $ curl "http://localhost:4569/203.217.72.134"

Nunawading
AU
Australia
10.0
11.0
3420014592
-37.8167
145.167
07
Victoria

Grab the data from here: http://ipinfodb.com/ip_database.php
You're after the "Complete (City)" with one table.

Load the data with:
mysql -u -p < ipinfodb_one_table_full.sql

I got the idea for this from this site:
http://blog.makezine.com/archive/2009/03/free_unlimited_ip_address_geolocati.html?CMP=OTC-0D6B48984890