session| Statistics | online | Online numbers the most common way to achieve online demographics is Golobal.asa combined session, but this approach has two disadvantages:
1, each session to occupy 12k of server memory space, for the number of +1 will pay 12k memory costs.
2, Golobal.asa to put in the root directory of the site will play a role, and the root directory can only have a golobal, contradictions outstanding.
To this end, there is a use of cookies and application in the ASP file to achieve online statistics method, welcomed the criticism, common discussion:
Step one: Make a framework that contains hidden frames (count.asp)
Step Two: Write count.asp
<%
User=request.cookies ("21bbsusername")
Totaluser=application ("User")
If InStr (Totaluser,user) =0 Then
Application.Lock
Application ("user") =totaluser& ";" &user
Application.UnLock
End If
%>
<meta http-equiv= "Refresh" content= "2" >
<body>
</body>
Step three: Show
User=split (Application ("User"), ";")
Num=ubound (user)
Response.Write Num