Hello again,
how can I get my current IP address using Ajax helpers, in rails ?
I have found solution to get it with java functions :
but I would like to avoid using java, if it’s possible…
any idea ?
Thanks, Thib
Hello again,
how can I get my current IP address using Ajax helpers, in rails ?
I have found solution to get it with java functions :
but I would like to avoid using java, if it’s possible…
any idea ?
Thanks, Thib
@client_ip = request.remote_ip
Thanks to answer so quickly !
But, is it possible to get it with javascript, instead of ruby ? (if
an ajax helper exist for that…)
you can use $ip = $_SERVER[‘REMOTE_ADDR’];
in php script then get it with ajax
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs