HostIpInfo
HostIpInfo is get host infomation from ip address. (using hostip.info)
Installation
$ sudo gem install hostipinfo
Usage
require 'rubygems'
require 'host_ip_info'
h = HostIpInfo.new
ip = '12.215.42.19'
info = h.info(ip)
info['country']
#=> 'UNITED STATES'
info['country_code']
#=> 'US'
info['city']
#=> 'Sugar Grove'
info['region']
#=> 'IL'
info['latitude']
#=> 41.7696
info['longitude']
#=> -88.4588
- Author
-
gorou ( rails2u.com ) <[email protected]>
- Copyright
-
Copyright © 2005 gorou
- License
-
MIT License