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
- Host: GitHub
- URL: https://github.com/dkam/locate_by_ip
- Owner: dkam
- Created: 2009-09-05T03:38:20.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2009-09-05T06:40:40.000Z (over 15 years ago)
- Last Synced: 2025-02-03T14:48:29.896Z (4 months ago)
- Language: Ruby
- Homepage:
- Size: 74.2 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
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.sqlI got the idea for this from this site:
http://blog.makezine.com/archive/2009/03/free_unlimited_ip_address_geolocati.html?CMP=OTC-0D6B48984890