| This is a programming example from the book Active Server Pages Unleashed. To learn more, buy the book online. |
FILE: whoson.asp
LAST GENERATED: 1/18/98 6:09:42 PM<!-- #INCLUDE VIRTUAL="/includes/tracker.asp" > -->
<%
MyServer=Request.ServerVariables("SERVER_NAME")
MyPath=Request.ServerVariables("SCRIPT_NAME")
MySelf="HTTP://"&MyServer&MyPath
%>
<html>
<head>
<meta HTTP-EQUIV="REFRESH" CONTENT="20;<%=MySelf%>">
<title>WHOSON</title>
</head>
<body BGCOLOR="#FFFFFF">
<div ALIGN="RIGHT"><a HREF="/default.asp"><img SRC="/images/asphome.gif" BORDER="0" WIDTH="69" HEIGHT="38"></a><a HREF="/source/s_whoson.asp"><img SRC="/images/viewsource.gif" BORDER="0" WIDTH="63" HEIGHT="37"></a></div>
<%
Application.Lock
Set TempStats=Application("stats")
Application.Unlock
%>
<center>
<b>Total Users:</b> <%=TempStats.Count %>
<table BORDER="1" CELLPADDING="10" bgcolor="#6699cc">
<tr><th>User ID</th><th>Current Page</th></tr>
<%
TempItems=TempStats.Items
TempKeys=TempStats.Keys
For i=0 to UBOUND(TempKeys)
%>
<tr><td><%=Tempkeys(i)%></td><td><%=TempItems(i)%></td></tr>
<%
Next
%>
</table>
</center>
</body>
</html>