Extracting OS Name

Hello,

At the time of downloading, I want to save the values of IP Address & Client Type( from which OS - Mac/Windows/Linux & system it was downloaded ) to the database.

Any ideas how can I achieve this ?

Thanks.

Hello,

From my rails application, I have given a download button, which will
download a file from the server.
At the time of downloading, I want to save the values of IP Address & Client
Type( from which OS - Mac/Windows/Linux & system it was downloaded ) to the
database.
Any ideas how can I achieve this ?

google for
rails get client os ip

Colin

Thanks a lot. It seems useful. I am going to try this.

http://mohitsharma.net/how-get-browser-operating-system-and-client-ip-rails

Hello,

Thanks for the reply.

I got correct solution for system os. But I am getting the ip as 127.0.0.1 which is default.

I tried a few solutions. but nothing seems to be working. All are giving me same results.

How can I change the ipaddress to the current system;s ipaddress ?

Hello,

Thanks for the reply.
I got correct solution for system os. But I am getting the ip as 127.0.0.1
which is default.
I tried a few solutions. but nothing seems to be working. All are giving me
same results.
How can I change the ipaddress to the current system;s ipaddress ?

That is just because you are accessing the app from the same PC as the
server is running on.
If you go to a different PC and access the server on the first PC from
there you should find that it shows the correct IP address.

Colin

Thanks a lot. I tried with another system & it is working.