?
Solved

How many people online?

Posted on 2005-03-02
5
Medium Priority
?
186 Views
Last Modified: 2010-04-06
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
Comment
Question by:talktome_prashanth
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 35

Expert Comment

by:YZlat
ID: 13441983
do you log in into your application?
If so, set a session variable and increment it in Global.asa file inside Session_Start
0
 

Author Comment

by:talktome_prashanth
ID: 13442146
No,
 i just need to see the number of people who are viewing the pages.
Thank You,
Prashanth
0
 
LVL 6

Expert Comment

by:benwiggy
ID: 13442651
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
 
LVL 6

Accepted Solution

by:
benwiggy earned 2000 total points
ID: 13442659
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
 
LVL 3

Expert Comment

by:Masoudgh
ID: 14039306
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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question