I'm using ruby with Sinatra. I want get the public ip of visitors and save it in a database, but a don't know how get the ip... Sorry, but I have not found a way to do that. Guys can help me? Thank you!
Asked
Active
Viewed 1,311 times
1
-
This didn't work..??. `ip_addr = request.env['REMOTE_ADDR']` – Hiren Pandya Apr 11 '13 at 04:48
-
This might also help... http://stackoverflow.com/questions/4465476/rails-get-client-ip-address – Hiren Pandya Apr 11 '13 at 04:49
-
And this... http://stackoverflow.com/questions/1226959/how-to-get-client-ip-and-server-ip-using-rails .. Please try to google something before just giving up on it.. and show some efforts and show us then and only then we can help... Thank you.. – Hiren Pandya Apr 11 '13 at 04:50
-
3Except all those examples are for rails, so please try reading the question before posting snide comments. – sevenseacat Apr 11 '13 at 05:05