[PHP] 접속 브라우저 알아내기
function getBrowser() { $broswerList = array('MSIE', 'Chrome', 'Firefox', 'iPhone', 'iPad', 'Android', 'PPC', 'Safari', 'none'); $browserName = 'none'; foreach ($broswerList as $userBrowser){ if($userBrowser === 'none') break; if(strpos($_SERVER['HTTP_USER_AGENT'], $userBrowser)) { $browserName = $userBrowser; break; } } return $browserName; } 반환 값 = MSIE, Chrome, Firefox, iPhone, iPad, Android,..