Como mostrar la IP, el navegador y el S.O.


http://www.asptutor.com

Como mostrar la IP, el navegador y el S.O.



<%'mostrando la ip, el browser y el s.o. del cliente
ua = Request.ServerVariables("HTTP_USER_AGENT")
os = Request.ServerVariables("HTTP_UA_OS")
If Instr(ua, "MSIE") Then
If Instr(ua, "MSIE 5.") Then
Browser = "Microsoft Internet Explorer 5.x"
Elseif Instr(ua, "MSIE 4.") Then
Browser = "Microsoft Internet Explorer 4.x"
Elseif Instr(ua, "MSIE 3.") Then
Browser = "Microsoft Internet Explorer 3.x"
If Instr(ua, "MSIE 3.02") Then
Browser = "Microsoft Internet Explorer 3.02"
End If
Else
Browser = "Microsoft Internet Explorer"
End If
ElseIf Instr(ua, "Mozilla") and Instr(ua, "compatible") = 0 Then
If Instr(ua, "Mozilla/4") Then
Browser = "Netscape Navigator 4.x"
Elseif Instr(ua, "Mozilla/3") Then
Browser = "Netscape Navigator 3.x"
Else
Browser = "Netscape Navigator"
End If
End If

If Instr(ua, "Windows 95") or Instr(ua, "Win95") Then
System = "Windows 95"
Elseif Instr(ua, "Windows 98") or Instr(ua, "Win98") Then
System = "Windows 98"
Elseif Instr(ua, "Windows 3.1") or Instr(os, "Win16") Then
System = "Windows 3.x/Windows NT 3.x"
Elseif Instr(ua, "NT") or Instr(oa, "NT") Then
System = "Windows NT"
Elseif Instr(ua, "Mac") Then
System = "Mac"
If Instr(ua, "PowerPC") or Instr(ua, "PPC") Then
System = "Mac PPC"
Elseif Instr(ua, "68000") or Instr(ua, "68K") Then
System = "Mac 68K"
End If
Elseif Instr(ua, "X11") Then
System = "UNIX"
End If
%>

Tu Browser es: <%=Browser%> Bajo un sistema operativo: <%=System%>.
Tu IP es: <%=Request.ServerVariables("Remote_Addr")%>