Hi, We just got a new client who wants to personalize the content of his site''s pages based on user''s geographical location (using the user''s IP for determining the location). I came across http://geokit.rubyforge.org/ and it seems to be a pretty good tool, however it has one downside: It uses hostip.info''s ip location database which seems somewhat incomplete (i.e. it knows my office''s ip address but did not know my San Francisco home ip address - i''m thinking that if they can''t recognize a San Francisco ip address it is probably worse for places outside US). I was wondering if anyone has came across some good ip location databases (free or not) that can be easily queried from ruby and/or rails. Once user''s geo coordinates are known (lat/long), I could use geokit.rubyforge.org for distance calculations using Google or Yahoo''s APIs (supported by geokit.rubyforge.org from what I could see). Thanks, Gabor --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> We just got a new client who wants to personalize the content of his > site''s pages based on user''s geographical location (using the user''s > IP for determining the location). > > I came across http://geokit.rubyforge.org/ and it seems to be a pretty > good tool, however it has one downside: > > It uses hostip.info''s ip location database which seems somewhat > incomplete (i.e. it knows my office''s ip address but did not know my > San Francisco home ip address - i''m thinking that if they can''t > recognize a San Francisco ip address it is probably worse for places > outside US). > > I was wondering if anyone has came across some good ip location > databases (free or not) that can be easily queried from ruby and/or > rails. Once user''s geo coordinates are known (lat/long), I could use > geokit.rubyforge.org for distance calculations using Google or Yahoo''s > APIs (supported by geokit.rubyforge.org from what I could see).Don''t know about ruby integration, but maxmind is what openads (an open source ad serving package) uses... http://www.maxmind.com/app/ip-location --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Just checked maxmind. Seems to fit the bill in terms of ip coverage, but they require the installation of a C API and then a Ruby API on top of it to work. Quite a hassle, given that there are many very straightforward php solutions out there. I''m basically trying to convince my company to use RoR as opposed to PHP on this project and so far the lack of a RoR solution as straightforward as PHP makes RoR loose the game :(. Any other suggestions of a Ruby / RoR friendly way to detect users'' geolocation based on their IP address? On May 30, 11:01 am, Philip Hallstrom <r...-SUcgGwS4C16SUMMaM/qcSw@public.gmane.org> wrote:> > We just got a new client who wants to personalize the content of his > > site''s pages based on user''s geographical location (using the user''s > > IP for determining the location). > > > I came acrosshttp://geokit.rubyforge.org/and it seems to be a pretty > > good tool, however it has one downside: > > > It uses hostip.info''s ip location database which seems somewhat > > incomplete (i.e. it knows my office''s ip address but did not know my > > San Francisco home ip address - i''m thinking that if they can''t > > recognize a San Francisco ip address it is probably worse for places > > outside US). > > > I was wondering if anyone has came across some good ip location > > databases (free or not) that can be easily queried from ruby and/or > > rails. Once user''s geo coordinates are known (lat/long), I could use > > geokit.rubyforge.org for distance calculations using Google or Yahoo''s > > APIs (supported by geokit.rubyforge.org from what I could see). > > Don''t know about ruby integration, but maxmind is what openads (an open > source ad serving package) uses... > > http://www.maxmind.com/app/ip-location--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
MaxMind has a REST web API -- it would be straightforward to call it from Ruby code. Examples in a few other languages are here: http://www.maxmind.com/app/web_services_cityisporg_usage If you use MaxMind, think about implementing it as a GeoKit Geocoder. We can then incorporate MaxMind into GeoKit. On May 30, 1:34 pm, gabordemeter <gabordeme...-YbzV19J7KiEAvxtiuMwx3w@public.gmane.org> wrote:> Just checked maxmind. Seems to fit the bill in terms of ip coverage, > but they require the installation of a C API and then a Ruby API on > top of it to work. Quite a hassle, given that there are many very > straightforward php solutions out there. > > I''m basically trying to convince my company to use RoR as opposed to > PHP on this project and so far the lack of a RoR solution as > straightforward as PHP makes RoR loose the game :(. > > Any other suggestions of a Ruby / RoR friendly way to detect users'' > geolocation based on their IP address? > > On May 30, 11:01 am, Philip Hallstrom <r...-SUcgGwS4C16SUMMaM/qcSw@public.gmane.org> wrote: > > > > We just got a new client who wants to personalize the content of his > > > site''s pages based on user''s geographical location (using the user''s > > > IP for determining the location). > > > > I came acrosshttp://geokit.rubyforge.org/andit seems to be a pretty > > > good tool, however it has one downside: > > > > It uses hostip.info''s ip location database which seems somewhat > > > incomplete (i.e. it knows my office''s ip address but did not know my > > > San Francisco home ip address - i''m thinking that if they can''t > > > recognize a San Francisco ip address it is probably worse for places > > > outside US). > > > > I was wondering if anyone has came across some good ip location > > > databases (free or not) that can be easily queried from ruby and/or > > > rails. Once user''s geo coordinates are known (lat/long), I could use > > > geokit.rubyforge.org for distance calculations using Google or Yahoo''s > > > APIs (supported by geokit.rubyforge.org from what I could see). > > > Don''t know about ruby integration, but maxmind is what openads (an open > > source ad serving package) uses... > > >http://www.maxmind.com/app/ip-location--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---