browser - PHP get_browser() returns strange values -
i want use:
public function browsercheck() { static $browser; if(!isset($browser)){ $browser = get_browser($_server['http_user_agent'],true); } return $browser; }
as suggested on http://de3.php.net/manual/de/function.get-browser.php, somehow var_dump($result); output strange values:
array(30) { ["browser_name_regex"]=> string(6) "§^.*$§" ["browser_name_pattern"]=> string(1) "*" ["browser"]=> string(15) "default browser" ["version"]=> string(1) "0" ["majorver"]=> string(1) "0" ["minorver"]=> string(1) "0" ["platform"]=> string(7) "unknown" ["alpha"]=> string(0) "" ["beta"]=> string(0) "" ["win16"]=> string(0) "" ["win32"]=> string(0) "" ["win64"]=> string(0) "" ["frames"]=> string(1) "1" ["iframes"]=> string(0) "" ["tables"]=> string(1) "1" ["cookies"]=> string(0) "" ["backgroundsounds"]=> string(0) "" ["cdf"]=> string(0) "" ["vbscript"]=> string(0) "" ["javaapplets"]=> string(0) "" ["javascript"]=> string(0) "" ["activexcontrols"]=> string(0) "" ["isbanned"]=> string(0) "" ["ismobiledevice"]=> string(0) "" ["issyndicationreader"]=> string(0) "" ["crawler"]=> string(0) "" ["cssversion"]=> string(1) "0" ["supportscss"]=> string(0) "" ["aol"]=> string(0) "" ["aolversion"]=> string(1) "0" }
why? using chrome , gives me "§^.*$§" found name? can't true... wrong here?
this function uses information browscap.ini file. maybe not best solution because file not date time. try user agent , determine via regular expression name.
Comments
Post a Comment