<html>
<body>
<%
'crea el array de aplicacion
application.lock
if not isArray(application("last10")) then
dim miarray(10, 3)
application("last10") = miarray
end if
last10 = application("last10")
application.unlock
'mover cada visita abajo en el Array
if last10(9, 0) <> "" then
for i = 0 to 9
last10(i,0) = last10(i+1,0)
last10(i,1) = last10(i+1,1)
last10(i,2) = last10(i+1,2)
next
end if
'sumar una nueva entrada
for i = 0 to 9
if last10(i,0) = "" then
last10(i,0) = request.ServerVariables("REMOTE_ADDR")
last10(i,1) = request.ServerVariables("HTTP_USER_AGENT")
last10(i,2) = now
exit for
end if
next
'asigna la variable local a la variable de aplicación
application.lock
application("last10") = last10
application.unlock
'muestra los datos
response.write "<table align='center' border='1'>"
response.write "<tr>"
response.write "<td>Visita</td><td>Dirección IP</td><td>Navegador</td><td>Hora</td>"
response.write "</tr>"
for i=0 to 9
if last10(i,0) <> "" then
response.write "<tr>"
response.write "<td>" & i & "</td><td>" & last10(i, 0) & "</td><td>" & last10(i, 1) & "</td><td>" & last10(i, 2) & "</td>"
response.write "</tr>"
end if
next
response.write "</table> "
%>
</body>
</html>