使用Request.Servervariables("HTTP_USER_AGENT")取值
2008-03-11 08:48
519 查看
思路一:
使用Request.Servervariables("HTTP_USER_AGENT")取操作系统编号和浏览器版本号,配合split函数将字符串分成数组,再使用replace函数将数组内的部份字符串进行了替换。
思路二:
使用Request.Servervariables("HTTP_USER_AGENT")取出相关字符串后,使用Instr函数进行字符串的搜索,如Instr返回的值>0时,可判断是哪种操作系统和浏览。
使用Request.Servervariables("HTTP_USER_AGENT")取操作系统编号和浏览器版本号,配合split函数将字符串分成数组,再使用replace函数将数组内的部份字符串进行了替换。
strsplit=split(Request.Servervariables("HTTP_USER_AGENT"),";") strsplit(1)=replace(strsplit(1),"MSIE","Internet Explorer") strsplit(2)=replace(strsplit(2),"NT 5.1","XP") strsplit(2)=replace(strsplit(2),"NT 5.0","2000") strsplit(1)=Trim(strsplit(1)) strsplit(2)=Trim(strsplit(2))
思路二:
使用Request.Servervariables("HTTP_USER_AGENT")取出相关字符串后,使用Instr函数进行字符串的搜索,如Instr返回的值>0时,可判断是哪种操作系统和浏览。
相关文章推荐
- Request.ServerVariables("HTTP_USER_AGENT")
- ASP 使用 Request.ServerVariables(HTTP_REFERER) 方法获取请求页面地址的注意事项
- Request.ServerVariables["LOGON_USER"] 如何使用?
- Request.ServerVariables["LOGON_USER"] 如何使用
- Request.ServerVariables("HTTP_REFERER")不能使用
- HttpContext.Current.Request.ServerVariables.AllKeys
- HTTP_REFERER 与 HTTP_USER_AGENT的使用方法
- 使用Request.ServerVariables获取环境变量
- HttpContext.Current.Request.ServerVariables 所有命名的服务器变量的名称和值
- HttpRequest.ServerVariables[""]中的参数集
- Request.ServerVariables(”HTTP_REFERER”)防止下载盗链
- Request.ServerVariables(HTTP_REFERER)&数据提交时注意的问题
- HttpContext.Current.Request.ServerVariables
- 使用Request.ServerVariables获取环境变量
- $_SERVER['HTTP_USER_AGENT']
- 取得浏览器当前语言 Request.ServerVariables("HTTP_ACCEPT_LANGUAGE")
- 关于Request.ServerVariables("HTTP_REFERER")
- 使用火狐浏览器模仿手机浏览器,附浏览器HTTP_USER_AGENT汇总
- php $_SERVER['HTTP_USER_AGENT']
- Request.ServerVariables(HTTP_REFERER) 适用和不适用的情况