-
Notifications
You must be signed in to change notification settings - Fork 34
functions_modules_browser
Initializes the browser module.
Definition: public function browser_init()
Returns: void
Checks the remote browser. If $version is given will check the major version too, if $gt_match is true, greater versions will match too. Samples:
browser_is('msie',7,false); // true for InternetExplorer 7
browser_is('msie',7,true); // true for InternetExplorer 7, 8, 9, ...
browser_is('msie'); // true for every InternetExplorer
Definition: public function browser_is($id, $version, $gt_match=true)
Returns: bool
true or false
Parameters:
-
string $id
Browser id (msie, firefox,...) -
int $version
Major version to check -
bool $gt_match
If true greater versions match too
SHORTCUT browser_is('MSIE')
SHORTCUT browser_is('MSIE',6,false)
SHORTCUT browser_is('MSIE',7,false)
SHORTCUT browser_is('MSIE',8,false)
SHORTCUT browser_is('MSIE',9,false)
SHORTCUT browser_is('MSIE',10,false)
SHORTCUT browser_is('MSIE',7,true)
SHORTCUT browser_is('MSIE',8,true)
SHORTCUT browser_is('FIREFOX')
SHORTCUT browser_is('FIREFOX',3,true)
INTERNAL Fetches all browser information from $_SERVER['HTTP_USER_AGENT']