IP2Location Ruby Library





5
Date Submitted Thu. Nov. 30th, 2006 11:40 PM
Revision 1 of 1
Beginner ivy7878
Tags address | addresses | country | IP | Ruby
Comments 1 comments
IP2Location is a Ruby library that enables the user to find the country, region, city, coordinates, zip code, ISP and domain name that any IP address or hostname originates from. It has been optimized for speed and memory utilization. Developers can use the API to query all IP2Location™ binary databases for applications written in C or supporting static/dynamic library.

require 'IP2Location'

IP2LocObj = IP2Location.new()
IP2LocObj.open("data/IP-COUNTRY-SAMPLE.BIN")
rec = IP2LocObj.get_all("19.5.10.1")
puts rec.country_short
puts rec.country_long
puts rec.city
puts rec.region
puts rec.isp
puts rec.latitude
puts rec.longitude
puts rec.domain
puts rec.zipcode
puts rec.timezone
puts rec.netspeed
 

Ivy TSI

Comments

Comments what is this
Sun. Dec. 3rd, 2006 5:03 AM    Scripter bertheymans

Voting