Hello Aljish,
Create a global.asa with the following code in your root directory;
<SCRIPT LANGUAGE="VBScript" RUNAT="Server">
Sub Application_OnStart
Application("ActiveUsers") = 0
Application("TodaysDate") = Date
End Sub
Sub Session_OnStart
If Application("VisitorsToday") = "" then
Application("VisitorsToday") = 0
end if
Session.Timeout = 10 ' minutes
Session("Start") = Now
Application.Lock
Application("ActiveUsers") = Application("ActiveUsers") + 1
if Application("TodaysDate") = Date then
Application("VisitorsToday") = Application("VisitorsToday") + 1
else
Application("TodaysDate") = Date
Application("VisitorsToday") = 1
end if
Application.UnLock
End Sub
Sub Session_OnEnd
' Decrease the active visitors count when the session ends.
Application.Lock
Application("ActiveUsers") = Application("ActiveUsers") - 1
Application.UnLock
End Sub
</SCRIPT>
Then add this to where you want to see the active user (normally placed in the inc_top.asp);
<%Response.Write "<font size='-2'> Active Users: <font color='green'>" & Application("ActiveUsers") &"</font><br> Visits Today: <font color='red' size='-2'>" & Application("VisitorsToday") %>
I trust this is what you are after, the same as what is listed under the Snitz Forums 2000 graphic in the top left hand corner.
quote:
hi
where can i get this scrpit visits today
i have setup active users in my forum.is it show in the same scrpit