•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Ruby section within the Web Development category of DaniWeb, a massive community of 332,776 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,815 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Ruby advertiser: SELL YOUR PRODUCT TODAY !
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.
Last edited : May 12th, 2007.
<% 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 %>
Post Comment
•
•
•
•
DaniWeb Marketplace (Sponsored Links)