A simple GeoIP webservice made with Sinatra
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Capfile-dreamhost
LICENSE
README
Rakefile
config.ru
geoip.rb

README

"sandiego" is a very simple GeoIP webservice using the Sinatra framework.

It was inspired by the need to have access to basic GeoIP lookup functionality
that many times is not included in shared hosting environments, and due to
library dependencies can't be easily added to projects in such environments.

HOW TO USE

1. Fetch a GeoIP database (i.e. http://www.maxmind.com/app/geolitecity) and
   save it in the project's directory.

2. Make sure you have the geoip_city and yajl gems installed.

3. Run the daemon with "ruby geoip.rb".

WEBSERVICE API

URLs

  GET /geoip/x.y.z.k

    Returns the GeoIP information for IP "x.y.z.k" in JSON format.