Home >Backend Development >PHP Tutorial >怎么辨别是否是ANDRIOID系统

怎么辨别是否是ANDRIOID系统

WBOY
WBOYOriginal
2016-06-23 14:21:031080browse

怎么辨别客户端是否是ANDRIOID系统?


回复讨论(解决方案)

if(preg_macth('@android@i',$_SERVER['HTTP_USER_AGENT'])){

}

if(preg_macth('@android@i',$_SERVER['HTTP_USER_AGENT'])){

}
用stripos更好一些,这么简单的东西不用麻烦正则它老人家
if(stripos('android',$_SERVER['HTTP_USER_AGENT'])!==FALSE){

}

mark
学习下.

根据 user agent,判断 iphone 微信 pc android

写在blog里面了自己看吧.
http://blog.csdn.net/aaronlp/article/details/10389203

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:php中表单验证 == 与===Next article:session id问题