פונקציה שמחזירה את סוג הדפדפן של המשתמש, גרסה וכו.. ( אפשר גם ב js)
mixed get_browser ([ string $user_agent [, bool $return_array = false ]] )
פרמטרים:
user_agent-
The User Agent to be analyzed. By default, the value of HTTP User-Agent header is used; however, you can alter
this (i.e., look up another browser's info) by passing this parameter.
You can bypass this parameter with a
NULLvalue. return_array- true במידה ורוצים שיוחזר מערך ולא אובייקט
דוגמא:
<?php echo $_SERVER['HTTP_USER_AGENT'] . "\n\n"; $browser = get_browser(null, true); print_r($browser); ?>
http://php.net/manual/en/function.get-browser.php