<%
Function CheckMobile()
'是否由wap转入电脑版
If Not IsEmpty(Request.ServerVariables("HTTP_REFERER")) And InStr(LCase(Request.ServerVariables("HTTP_REFERER")),"wap/index.asp")=0 Then
CheckMobile=False:Exit Function
End If
'是否专用wap浏览器
If InStr(LCase(Request.ServerVariables("HTTP_ACCEPT")), "application/vnd.wap.xhtml+xml") Or Not IsEmpty(Request.ServerVariables("HTTP_X_PROFILE")) Or Not IsEmpty(Request.ServerVariables("HTTP_PROFILE")) Then
CheckMobile=True:Exit Function
End If
'是否(智能)手机浏览器
Dim MobileBrowser_List,PCBrowser_List,UserAgent
Set MobileBrowser_List = New RegExp '建立正则表达式
Set PCBrowser_List = New RegExp '建立正则表达式
MobileBrowser_List.Pattern ="up.browser|up.link|mmp|iphone|android|wap|netfront|java|opera\smini|ucweb|windows\sce|symbian|series|webos|sonyericsson|sony|blackberry|cellphone|dopod|nokia|samsung|p
ASP检测手机客户端并跳转到相应页面
最新推荐文章于 2023-02-15 18:20:16 发布