views:

597

answers:

2

My code at: http://www.mgxvideo.com/mgxcopy-dev/get_browser.php, returns Opera when I run IE8. My source is:

<?php
$browser = get_browser(null, true);
echo $browser['browser'];
?>
+2  A: 

It doesn't. The get_browser() function is making educated (but ill-informed) guesses about which browser the user-agent is running. Your browser capabilities file is likely outdated, probably because it was made before IE8 was released. Update it here.

The real IE8 user-agent string looks something like this:

Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0)
John Feminella
A: 

You should use a lower-level tool, like a packet trace or server logging or a header dump to see what is being sent.

benc