function isIosDevice(){
$userAgent = strtolower($_SERVER['HTTP_USER_AGENT']);
$iosDevice = array('iPhone', 'iPod', 'iPad', 'Macintosh');
$isIos = false;
foreach ($iosDevice as $val) {
if(stripos($userAgent, $val) !== false){
$isIos = true;
break;
}
}
return $isIos;
}
echo '<pre>';
print_r(isIosDevice());
echo '</pre>';
echo '<pre>';
print_r($_SERVER['HTTP_USER_AGENT']);
echo '</pre>';
Mã nguồn code web của Ánh Linh năm 2021 có những cập nhật gì mới?