浏览器识别-ASP.NET、ASP、PHP 获取 User Agent

作者:vkvi 来源:ITPOW(原创) 日期:2010-8-17

ASP.NET 获取 User Agent

string ua = Request.UserAgent;
// 或
// string ua = Request.ServerVariables["HTTP_USER_AGENT"];
// 或
// string ua = Request.Headers["User-Agent"];

ASP 获取 User Agent

ua = Request.ServerVariables("HTTP_USER_AGENT")

PHP 获取 User Agent

<?php
echo $_SERVER['HTTP_USER_AGENT']
?>

 

相关文章