Script won't identify browser - correctly - anyone know why?
Posted: Thu Nov 24, 2011 11:14 am
http://chrisschuld.com/projects/browser ... -from-php/
This page shows ways to get the browser type.
If I do this in Firefox, it shows up as
[text]Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0[/text]
But if I do it in Internet Explorer 9, it shows up as:
[text]Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)[/text]
I need to be able to find out what the browser is, to show one of two different images (that differ because of layout differences.).
This page shows ways to get the browser type.
Code: Select all
$browser = $_SERVER['HTTP_USER_AGENT'];[text]Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0[/text]
But if I do it in Internet Explorer 9, it shows up as:
[text]Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)[/text]
I need to be able to find out what the browser is, to show one of two different images (that differ because of layout differences.).