Detect User Browser in PHP

Lately post is about detecting user’s component in PHP, now is about user’s browser, i used this to make some code’s condition, if its chrome its shows this and etc mostly is about layout. Here is the code : function getBrowser() { $u_agent = $_SERVER[‘HTTP_USER_AGENT’]; $bname = ‘Unknown’; if(preg_match(‘/MSIE/i’,$u_agent) && !preg_match(‘/Opera/i’,$u_agent)) { $bname = ‘Internet …