真正实用的ASP判断手机访问并跳转的代码
来源:互联网 发布:网络的发展趋势 编辑:程序博客网 时间:2024/06/16 09:19
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")) '网关信息
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 "请访问手机版本http://m.logo880.cn"
response.redirect "http://m.logo880.cn"
response.end
else
'response.redirect "http://www.logo880.cn"
'response.end
End if
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")) '网关信息
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 "请访问手机版本http://m.logo880.cn"
response.redirect "http://m.logo880.cn"
response.end
else
'response.redirect "http://www.logo880.cn"
'response.end
End if
0 0
- 真正实用的ASP判断手机访问并跳转的代码
- 真正实用的ASP判断手机访问并跳转的代码
- ASP 判断网站能否访问 真正好用的
- PHP 判断访问来源是否来自手机并跳转页面
- 用百度siteapp的uaredirect.js判断用户访问端而进行域名的自动跳转,并通过cookie记录手机访问电脑端的状态
- dede判断手机访问电脑端网站跳转代码
- JS代码判断访问网站客户端的操作系统,实现跳转
- 判断当前访问web项目的设备,如果是手机则跳转手机页面
- 通过PHP自带的$_SERVER判断 手机访问网站自动跳转到手机版
- 判断是手机还是电脑访问的代码
- js判断手机网站,手机浏览器检测,并跳转到手机网站代码
- js判断手机网站,手机浏览器检测,并跳转到手机网站代码
- ASP.NET的实用代码
- php 判断手机端访问并设置默认访问模块的方法
- ThinkPHP3.2判断手机端访问并设置默认访问模块的方法
- JS判断手机端访问页面并跳转到指定页面
- 判断手机访问js代码
- 判断是否是手机端并跳转
- scrapy命令笔记
- 机器学习第三章复习(4)
- 设计模式(Design Patterns)
- 轨迹球Controls使用记录
- 聚类——混合高斯模型 Gaussian Mixture Model
- 真正实用的ASP判断手机访问并跳转的代码
- java并发之synchronized
- 哈希表与一致性哈希
- 【程序40】 题目:字符串排序。
- protobuf介绍以及使用方法用例
- Jersey使用注解和过滤器实现日志记录
- 工作日记:Excel转化功能交作业了,学习了git
- 8种CSS实现垂直居中水平居中的绝对定位居中技术
- 关于Android自己native share function(不用第三方库)