<SCRIPTLanguage=VBScript RUNAT=Server>
'在应用程序启动时，将存储在线人数的Application变量online的初值设为0
SUB Application_Onstart
   Application("online")=0 
END SUB
</SCRIPT>
<SCRIPT Language=VBScript RUNAT=Server>
'在每个Session开始时，设置Session的超时时间为1分钟，并将online变量的值加1
SUB Session_Onstart
   Session.TimeOut=1
   Application.Lock
   Application("online")=application("online")+1
   Application.Unlock
END SUB
'在每个Session结束时，将online变量的值减1
SUB Session_Onend
   Application.Lock
   Application("online")=application("online")-1
   Application.Unlock
END SUB
</SCRIPT>
