Tim X
4/26/2007 10:06:00 AM
Veera Sundaravel <veeraa2003@yahoo.co.in> writes:
> HI everybody,
>
> I'm newbie to ruby. I want to get user's browser and OS information like
> getting ip address using request.remote_ip. Is it possible.
>
> Regards,
> Veeraa.
>
> --
This information is part of the standard 'agent' information passed by browsers
as an environment variable (well accessible as an environment variable).
However, note that this information cannot be trusted (ie. its easy to fake and
some browsers actually provide ways of faking it).
How you actually access this information depends on whether your using a ruby
library or just reading the data from stdin from the server etc. Most libraries
provide an ENV hash or object that you can query.
Tim
--
tcross (at) rapttech dot com dot au