View Single Post
Old 12-17-2005, 12:02 AM   PM User | #11
Element
Regular Coder

 
Element's Avatar
 
Join Date: Jul 2004
Location: Lynnwood, Washington, US
Posts: 855
Thanks: 2
Thanked 2 Times in 2 Posts
Element is an unknown quantity at this point
I found this today and it might be more absolute then this functoin. Go ahead and try it if you want.

get_browser()

Quote:
Array
(
[browser_name_regex] => ^mozilla/5\.0 (windows; .; windows nt 5\.1; .*rv:.*) gecko/.* firefox/0\.9.*$
[browser_name_pattern] => Mozilla/5.0 (Windows; ?; Windows NT 5.1; *rv:*) Gecko/* Firefox/0.9*
[parent] => Firefox 0.9
[platform] => WinXP
[browser] => Firefox
[version] => 0.9
[majorver] => 0
[minorver] => 9
[css] => 2
[frames] => 1
[iframes] => 1
[tables] => 1
[cookies] => 1
[backgroundsounds] =>
[vbscript] =>
[javascript] => 1
[javaapplets] => 1
[activexcontrols] =>
[cdf] =>
[aol] =>
[beta] => 1
[win16] =>
[crawler] =>
[stripper] =>
[wap] =>
[netclr] =>
)
Example:

PHP Code:
 
 
$browser
=get_browser($_SERVER['HTTP_USER_AGENT']);
 
echo 
$browser['browser']."<br />";
echo 
$browser['version'];
 
// OR
 
echo $browser->browser;
echo 
$browser->version

Last edited by Element; 12-17-2005 at 02:18 AM..
Element is offline   Reply With Quote