Refresh | Register | Logon
Welcome:  Guest
 Posted by: admin  Messages 
Don't like it since the global.asa needs to be used, which is not reliable. For those who wants it, here the simple solution:

Create global.asa file and place it at the root of your web site (not the application root).

===========
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub Session_OnStart()
Application.Lock
Application("rc_users") = Application("rc_users") + 1
Application.Unlock
End Sub

Sub Session_OnEnd()
Application.Lock
Application("rc_users") = Application("rc_users") - 1
Application.Unlock
End Sub
</SCRIPT>
================

On footer.asp page add anywhere:

<% Response.Write Application("rc_users") & " users are online." %>

Note: Session_OnStart and Session_OnEnd are flaky on some web servers.
Use the code as is
 Posted On: 5/25/2005 2:35:36 PM   Direct Link   
 Thread: Posted by: Posted On:
  Visitors online
admin 5/25/2005 2:35:36 PM