Site designed by Barry Wright
Mirror Ten Ltd
How to Count Active Visitors on your Website.
The Active Visitor Counter.
Free Web Page Counter
Page Counters
Simple Text Counter
Simple Image Counter
Active Visitor Counter
Recordset Counters
Records in Recordset
Form Counters
Counting Through Forms
Free Web Counter
Web Hit Counter
 
 
How to Count Active Visitors on your Website
The ASP Code (For your global.asa)

The following ASP code will allow you to Count and Display the amount of visitors that are currently on or viewing your website.

You will have to save this ASP code into a file called 'global.asa', which must be uploaded to the root of your webserver.

<SCRIPT LANGUAGE="VBScript" RUNAT="Server">
Sub Application_OnStart
Application("strVisitors") = 0
End Sub

Sub Application_OnEnd
End Sub

Sub Session_OnStart
Application.lock
Application("strVisitors")=Application("strVisitors") + 1
Application.unlock
End Sub

Sub Session_OnEnd
Application.lock
Application("strVisitors")=Application("strVisitors") - 1
Application.unlock
End Sub
</SCRIPT>

The Active User Results

Place following code where you want your Active Visitor results to appear.

<%
'Write the amount of active visitors
Response.Write(Application("strVisitors"))
%>

TradIndex
Share Dealing :)
Jacpotjoy