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

0
como-mostrar-la-ip-el-navegador-y-el-s-o-con-asp

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

Este ejemplo permite conocer el navegador, IP y Sistema Operativo del cliente.

<%'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")%>

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

Este sitio web utiliza cookies para que usted tenga la mejor experiencia de usuario. Si continúa navegando está dando su consentimiento para la aceptación de las mencionadas cookies y la aceptación de nuestra política de cookies, pinche el enlace para mayor información.

ACEPTAR
Aviso de cookies