I figured it out. def set_current_ip if params[:organization] && params[:host] @getip = Getip.new @getip.organization = params[:organization] @getip.host = params[:host] @getip.dyn_ip = request.env['REMOTE_ADDR'] @getip.save end end
It works if I manually set the url to http ://<domain name>/remoteip*?organization=mycompany&host=fileserver* It works for now and there is still a lot more I should do to this so I am still open for ideas. Trevor On Thu, Sep 2, 2010 at 5:08 PM, tlangas <trevorlan...@gmail.com> wrote: > 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-t...@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscr...@googlegroups.com<rubyonrails-talk%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- 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-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.