Link to home
Start Free TrialLog in
Avatar of talktome_prashanth
talktome_prashanth

asked on

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
Avatar of YZlat
YZlat
Flag of United States of America image

do you log in into your application?
If so, set a session variable and increment it in Global.asa file inside Session_Start
Avatar of talktome_prashanth
talktome_prashanth

ASKER

No,
 i just need to see the number of people who are viewing the pages.
Thank You,
Prashanth
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
ASKER CERTIFIED SOLUTION
Avatar of benwiggy
benwiggy
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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