if (preg_match("/(MSIE)[\/ ]?([0-9.]*)/", $_SERVER["HTTP_USER_AGENT"], $match))
{
$browser['name'] = $match[1];
$browser['version'] = $match[2];
// IE 版本小於 8
if((int)$browser['version'] <= 8)
{
doSomething();
}
}
Reference :
How can I detect the browser with PHP or JavaScript? - Stack Overflow
沒有留言:
張貼留言