Use this code snippet to get a browser view:
if (isset($_SERVER['HTTP_USER_AGENT'])) { $agent = $_SERVER['HTTP_USER_AGENT']; }
Then compare with the user agent string.
For example, to detect "Firefox", you could do:
if (strlen(strstr($agent, 'Firefox')) > 0) { $browser = 'firefox'; }
source share