ASP常用函数收藏乱七八糟未整理版(72)
Exit For
End If
On Error GoTo 0
End If
End If
Next
Set oFso = Nothing
End Function
'===================================================================================
' 函数原型:GetUserAgentInfo(ByRef vSoft,ByRef vOs)
'功能:获取客户端操作系统和浏览器信息
'参数:vSoft浏览器信息
'vOs操作系统信息
'返 回 值:无
'涉及的表:无
'===================================================================================
Public Function GetUserAgentInfo(ByRef vSoft, ByRef vOs)
Dim theSoft
theSoft = Request.ServerVariables("HTTP_USER_AGENT")
' 浏览器
If InStr(theSoft, "NetCaptor") Then
vSoft = "NetCaptor"
ElseIf InStr(theSoft, "MSIE 6") Then
vSoft = "MSIE 6.0"
ElseIf InStr(theSoft, "MSIE 5.5+") Then
vSoft = "MSIE 5.5"
ElseIf InStr(theSoft, "MSIE 5") Then
vSoft = "MSIE 5.0"
ElseIf InStr(theSoft, "MSIE 4") Then
vSoft = "MSIE 4.0"
ElseIf InStr(theSoft, "Netscape") Then
vSoft = "Netscape"
ElseIf InStr(theSoft, "Opera") Then
vSoft = "Opera"
Else
vSoft = "Other"
End If
' 操作系统
If InStr(theSoft, "Windows NT 5.0") Then
vOs = "Windows 2000"
ElseIf InStr(theSoft, "Windows NT 5.1") Then
vOs = "Windows XP"
内容版权声明:除非注明,否则皆为本站原创文章。