Ruby on Rails Thursday, September 2, 2010

I've seen several examples online about people wanting to record the
visitors remote IP Address for their own reasons. In my case I want to
record the IP address from a remote computer that uses a dynamic IP
address. I need this information saved without user interaction. Right
now I have a simple cron script set up on the remote servers that will
open a text browser for a few seconds to a page hidden on my website.
This way I can keep track of the remote ip address.

I currently have:
def set_current_ip
@remoteip = Remotetip.new
@remoteip.dyn_ip = request.env['REMOTE_ADDR']
@remoteip.save
end

And it works great. How ever I also need to record
@remoteip.orgainization and @remoteip.host. My first thoughts were to
use GET or POST and append the information on the end of the url. I've
not used GET or POST for some time and could really use some help.

If anyone knows of a better solution I'm open for suggestions.

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment