- Forums
- PHP
- Ways To Find What Type Of Browser Is Being Used By Users
This Page Contains information about Ways To Find What Type Of Browser Is Being Used By Users By wallpaperama in category PHP with 0 Replies. [1135], Last Updated: Sat May 18, 2024
wallpaperama
Wed Mar 19, 2008
0 Comments
510 Visits
$_SERVER['HTTP_USER_AGENT']
you can use $_SERVER['HTTP_USER_AGENT'] to find what browser your users are using.
or you can also use this function to find out.
PHP Code:
<?php
$browser = get_browser(null, true);
echo '<pre>';
print_r($browser);
echo '</pre>';
?>
this is example output:
Array
(
[browser_name_regex] => ^mozilla/5.0 (windows.*$
[browser_name_pattern] => Mozilla/5.0 (Windows*
[parent] => Netscape6
[platform] => Windows
[browser] => Netscape
[version] => 6.0b1
[majorver] => 6
[minorver] => 0b1
[frames] => 1
[tables] => 1
[cookies] => 1
[backgroundsounds] =>
[vbscript] =>
[javascript] => 1
[javaapplets] => 1
[activexcontrols] =>
[beta] => 1
[crawler] =>
[authenticodeupdate] =>
[msn] =>
)
hope this helps