• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 189
  • Last Modified:

How many people online?

Hi,
Is there any way to display how many people are online at the bottom of the page.
The pages are asp and uses vb script.

Thank You,
prashanth
0
talktome_prashanth
Asked:
talktome_prashanth
1 Solution
 
YZlatCommented:
do you log in into your application?
If so, set a session variable and increment it in Global.asa file inside Session_Start
0
 
talktome_prashanthAuthor Commented:
No,
 i just need to see the number of people who are viewing the pages.
Thank You,
Prashanth
0
 
benwiggyCommented:
Hi
http://usersonline.romazom.com - sounds like what you are looking for.
There are many such solutions in PHP - but not really in ASP.
Hope that helps,
Benjamin
0
 
benwiggyCommented:
By the way - you will need to put the code for the script which I linked to above at the bottom of each page of your site you want counted.
0
 
MasoudghCommented:
Hi
In asp classic you can use this:

global.asa :
<script language="vbscript" runat="server">
Sub Application_OnStart
    Application("visitors")=0
End Sub

Sub Session_OnStart
    Application.Lock
    Application("visitors")=Application("visitors")+1
    Application.UnLock
End Sub

Sub Session_OnEnd
    Application.Lock
    Application("visitors")=Application("visitors")-1
    Application.UnLock
End Sub
</script>


index.asp:
<html>
<head></head>
<body>
<p>
There are <%response.write(Application("visitors"))%>
online now!
</p>
</body></html>


Good luck
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now