ASP编码分辨手机上浏览并自动跳转的编码

HTTP_ACCEPT=Request.ServerVariables("HTTP_ACCEPT")                 获得访问器信息内容

HTTP_USER_AGENT=LCase(Request.ServerVariables("HTTP_USER_AGENT"))   获得AGENT

HTTP_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"))                 网关ip信息内容

Dim WapStr

WAPstr=False

If ubound(split(HTTP_ACCEPT,"vnd.wap"))>0 Then WAPstr=True

If HTTP_USER_AGENT="" Then  WAPstr=True

If HTTP_X_WAP_PROFILE"" Then  WAPstr=True

If HTTP_UA_OS"" Then  WAPstr=True

IF ubound(split(HTTP_VIA,"wap"))>0 Then  WAPstr=True

IF ubound(split(HTTP_USER_AGENT,"netfront"))>0 Then  WAPstr=True

IF ubound(split(HTTP_USER_AGENT,"iphone"))>0 Then  WAPstr=True

IF ubound(split(HTTP_USER_AGENT,"opera mini"))>0 Then  WAPstr=True

IF ubound(split(HTTP_USER_AGENT,"ucweb"))>0 Then  WAPstr=True

IF ubound(split(HTTP_USER_AGENT,"windows ce"))>0 Then  WAPstr=True

IF ubound(split(HTTP_USER_AGENT,"symbianos"))>0 Then  WAPstr=True

IF ubound(split(HTTP_USER_AGENT,"java"))>0 Then  WAPstr=True

IF ubound(split(HTTP_USER_AGENT,"android"))>0 Then  WAPstr=True

If WAPstr=True Then    

Response.Write "请浏览手机上版本号p>

response.redirect "p>

response.end

else  

response.redirect "p>

response.end

End if



广汉网站建设 互联网实名认证:aspcms仿站-广汉快宜优互联网 E-mail:
手机上: 申明: 快宜优 更快速,最划算,最佳质的模版建网站,aspcms仿站建网站,让您享有最暖心的服务!
The first brand to create imitation station industry

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://dgseoyh.cn/jingyan/3678.html