Determining client operating Systems
Function Getos (Content,systemorbrowser)
Dim Temp
temp = Split (content, ";")
Select Case Systemorbrowser
Case 0
If InStr (Content, "Windows NT 6.0") Then
Getos = "Windows Vista"
ElseIf InStr (Content, "Windows NT 5.2") Then
Getos = "Windows 2003"
ElseIf InStr (Content, "Windows NT 5.1") Then
Getos = "Windows XP"
ElseIf InStr (Content, "Windows NT 5.0") Then
Getos = "Windows 2000"
ElseIf InStr (Content, "Windows NT") Then
Getos = "Windows NT"
ElseIf InStr (Content, "Windows 9") Then
Getos = "Windows 9x"
ElseIf InStr (Content, "Unix") Then
Getos = "Unix"
ElseIf InStr (Content, "Linux") Then
Getos = "Linux"
ElseIf InStr (Content, "SunOS") Then
Getos = "SunOS"
ElseIf InStr (Content, "BSD") Then
Getos = "BSD"
ElseIf InStr (Content, "Mac") Then
Getos = "Mac"
Else
Getos = "Other"
End If
Case 1
If InStr (content, "Opera") Then
Getos = Replace (Left (content,instr (content, "()-1),"/"," "
ElseIf InStr (content, "MSIE") > 0 Then
Getos = Trim (temp (1))
Else
Getos = Replace (Right (temp (4), Len (Temp (4))-InStrRev (Temp (4), "")), "/", "" "
End If
End Select
End Function