Showing posts with label Classic ASP VB script. Show all posts
Showing posts with label Classic ASP VB script. Show all posts

Saturday, July 20, 2013

How to get detailed info about all online visitors that are currently browsing Using Classic ASP

Count the number of current users / sessions using Classic asp VB script

Count the number of current users / sessions:

<%
 sub session_onStart()  
    application.lock() 
    application("SessionCount") = application("SessionCount") + 1 
    application.unlock() 
 end sub 
sub session_onEnd()  
    application.lock() 
    application("SessionCount") = application("SessionCount") - 1 
    application.unlock()  
end sub 
sub application_onStart()  
    ' No need to lock in onStart() 
     application("SessionCount") = 0  
end sub 
%>

Note: to know number of current users / session Print    application("SessionCount") variables

<%= application("SessionCount") %>