<%HTTP_ACCEPT=Request.ServerVariables("HTTP_ACCEPT") '获取浏览器信息HTTP_USER_AGENT=LCase(Request.ServerVariables("HTTP_USER_AGENT")) '获取AGENTHTTP_X_WAP_PROFILE=Request.ServerVariables("HTTP_X_WAP_PROFILE") 'WAP特定信息 品牌机自带浏览器都会有HTTP_UA_OS=Request.ServerVariables("HTTP_UA_OS") '手机系统 电脑为空HTTP_VIA=LCase(Request.ServerVariables("HTTP_VIA")) '网关信息Dim WapStrWAPstr=FalseIf ubound(split(HTTP_ACCEPT,"vnd.wap"))>0 Then WAPstr=TrueIf HTTP_USER_AGENT="" Then WAPstr=TrueIf HTTP_X_WAP_PROFILE<>"" Then WAPstr=TrueIf HTTP_UA_OS<>"" Then WAPstr=TrueIF ubound(split(HTTP_VIA,"wap"))>0 Then WAPstr=TrueIF ubound(split(HTTP_USER_AGENT,"netfront"))>0 Then WAPstr=TrueIF ubound(split(HTTP_USER_AGENT,"iphone"))>0 Then WAPstr=TrueIF ubound(split(HTTP_USER_AGENT,"opera mini"))>0 Then WAPstr=TrueIF ubound(split(HTTP_USER_AGENT,"ucweb"))>0 Then WAPstr=TrueIF ubound(split(HTTP_USER_AGENT,"windows ce"))>0 Then WAPstr=TrueIF ubound(split(HTTP_USER_AGENT,"symbianos"))>0 Then WAPstr=TrueIF ubound(split(HTTP_USER_AGENT,"java"))>0 Then WAPstr=TrueIF ubound(split(HTTP_USER_AGENT,"android"))>0 Then WAPstr=TrueIf WAPstr=True Then Response.Write "请访问手机版本http://m.buychinaphone测试数据" response.redirect "http://m.buychinaphone测试数据"response.endelse response.redirect "http://HdhCmsTestbuychinaphone测试数据"response.endEnd if %> 查看更多关于asp判断进入网站的客户是手机还是pc的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did24