The following is from the w3schools ASP site:
"visitors" would be the variable
global.asa
----------
<script language="vbscript" runat="server">
Sub Application_OnStart
Application("visitors"=0
End Sub
Sub Session_OnStart
Application.Lock
Application("visitors"=Application("visitors"+1
Application.UnLock
End Sub
Sub Session_OnEnd
Application.Lock
Application("visitors"=Application("visitors"-1
Application.UnLock
End Sub
</script>
Now to reference that variable:
myPage.asp
----------
<html>
<head>
</head>
<body>
<p>
There are <%response.write(Application("visitors")%>
online now!
</p>
</body>
</html>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.