function getDeviceType()
{
$agent = strtolower($_SERVER['HTTP_USER_AGENT']);
$type = 'other';
if(strpos($agent, 'iphone'))
{
$type = 'iphone';
}
else if (strpos($agent, 'ipad'))
{
$type = 'ipad';
}
else if(strpos($agent, 'android'))
{
$type = 'android';
}
return $type;
}
php获取手机os
最新推荐文章于 2021-03-19 20:14:23 发布