Geolocater

Yet Another IP Geolocation Gem for Fun and Profit!

Installation

gem install geolocater

Usage

Pass any properly formatted IPv4 address string to a new instance of Geolocater like so.

Geolocater.geolocate_ip(IP_ADDRESS_STRING)

and get back a JSON Hash of the results

=> {"city"=>"CITY", "region_code"=>"ST", "region_name"=>"Region Name", "metrocode"=>"999", "zipcode"=>"98765", "longitude"=>"-92.23", "country_name"=>"United States", "country_code"=>"US", "ip"=>"IP_ADDRESS", "latitude"=>"27.54"}

Details

Hashie::Mash.new(Geolocater.ip_lookup(IP_ADDRESS_STRING))

Future Features

How You Can Help

Thanks!