Hello, I want to know how to determine a location from IP address in Rails. For example, 124.108.48.2 is from which country, using which ISP, Time Zone, lat and lng. Appreciate if have any ideas? Thanks Chamnap --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
http://www.maxmind.com/ steve -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Chamnap wrote:> Hello, > > I want to know how to determine a location from IP address in Rails. > For example, 124.108.48.2 is from which country, using which ISP, Time > Zone, lat and lng. > Appreciate if have any ideas? > > Thanks > ChamnapIf you are looking for a free one you can use this: www . hostip . info (the spam catchers weren''t letting this through the normal way so I added the whitespace). There are better ones out there that are commercial. The data is a little bit better so with the commercial ones if I remember so, you''ll have to weigh the difference between cost and accuracy. To get Ruby on Rails to work with the site I mentioned, you will have to send your request in this format: http://api. hostip . info/?ip=12.215.42.19 (remove the whitespace) and it will return your data in XML: <gml:name>Sugar Grove, IL</gml:name> <countryName>UNITED STATES</countryName> <countryAbbrev>US</countryAbbrev> so you''ll have to parse the returned XML via Ruby on Rails to get what you need. I hope this gets you in the right direction. Unfortunately, in terms of exactly how to code it in Ruby on Rails, I am not sure. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thanks steve and mike. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---