Click to See Complete Forum and Search --> : Http_user_agent


#!perl
01-18-2006, 04:48 PM
I know that this variable stores the browser info, and OS info. My goal is to use a regex to test if the HTTP_USER_AGENT matches IE, Firefox, Safari, and a few other brosers. Can anyone reccomend the most efficiant way to do this? Also, how about the most efficiant way to get the OS from that.

CyCo
01-18-2006, 08:05 PM
Efficient?

HTTP-BrowserDetect-0.98 (http://search.cpan.org/~lhs/HTTP-BrowserDetect-0.98/BrowserDetect.pm)

Of course, if you want to roll your own...

Charles
01-19-2006, 09:50 AM
Just use the CGI.pm module. It already has this bilt in.

#!perl
01-19-2006, 05:16 PM
Here is the end result of my script:

http://cheatersinc.servehttp.com/testimg.pl?text=Coding Rules