Home > Backend Development > PHP Tutorial > 取得客户端浏览器和OS的基本信息_PHP

取得客户端浏览器和OS的基本信息_PHP

WBOY
Release: 2016-06-01 12:36:48
Original
1028 people have browsed it

$Agent=$_SERVER["HTTP_USER_AGENT"];
for($tmpa=0;$tmpa $regex.="(.+);";
}
ereg("\($regex+(.+)\)",$Agent,$cz);
for($tmpb=2;$tmpb $_C[]=strtolower(trim($cz[$tmpb]));
}
if(count($cz)>4){
echo "用户代理字符串:".$cz[4];
}
?>

以上你可以用$cz[2] 这个是浏览器的标识,$cz[3]是系统的标识
$cz[4] 这个基本很少有用户增加的

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template