判断访问接口的设备是安卓还是ios
生活随笔
收集整理的這篇文章主要介紹了
判断访问接口的设备是安卓还是ios
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
//判斷是安卓還是ios
function phontType(){//全部變成小寫字母$agent = strtolower($_SERVER['HTTP_USER_AGENT']);$type = 'other';//分別進(jìn)行判斷if(strpos($agent, 'iphone') || strpos($agent, 'ipad')){$type = 'ios';}if(strpos($agent, 'android')){$type = 'android';}return $type;
}
?
轉(zhuǎn)載于:https://www.cnblogs.com/zwtqf/p/11305950.html
總結(jié)
以上是生活随笔為你收集整理的判断访问接口的设备是安卓还是ios的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 正则过滤特殊表情
- 下一篇: 数据库存带微信表情的昵称