The following code will need to added to your global.asa
file:
Sub application_OnStart
Application(“a_online_user”) =
0 ‘init our 2
variables
Application(“a_max_connect”) = 0
End
Sub
Sub Session_OnStart
Application.Lock ‘Lock the application
online =
CInt(Application(“a_online_user”)
online = online +
1
Application(“a_online_user”) = online
‘increment current online
users
max_online =
CInt(Application(“a_max_connect”)
if online >
max_online then ‘see if the # of
users online is at the highest
point
Application(“a_max_connect”) = online ‘update highest number
end
if
Application.Unlock
End Sub
Sub
Session_OnEnd
Application.Lock
‘ User left, subtract 1 from online
users
online =
CInt(“Application(“a_online_user”)
online = online –
1
Application(“a_online_user”) =
online
Application.UnLock
End Sub
Property of TechnologyAdvice. © 2025 TechnologyAdvice. All Rights Reserved
Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.