geoip_sinatra
geoip_sinatra copied to clipboard
A Sinatra app that performs IP geocoding
This is a Sinatra app that provides geoip information as a web service. It is not the first of it's kind, https://github.com/topfunky/sinatra-geoip is a predecessor and this app does pretty much the same thing.
There are two ways of getting geoip information:
- /location.json?ip=134.226.83.50 - To find the location of a specific IP
- /locateme.json - find out geo information about your own IP
This product includes GeoLite data created by MaxMind, available from http://www.maxmind.com/. The MaxMind GeoLite data is bundled, which is allowed under the redistribution terms here: http://www.maxmind.com/app/geolitecity
Requirements: The MaxMind C library, which is available through most package managers (e.g. homebrew, apt, or yum) or from http://www.maxmind.com/app/c . Note that this library is available on heroku.