Counting Number Of Users Online

I have a GLOBAL.ASA file in my Website directory :

Sub Application_OnStart
Application("Online_Users") = 0
End Sub

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

Sub Session_OnEnd
Application.Lock
Application("Online_Users") = Application("Online_Users") - 1
Application.UnLock
End Sub

When I open a new Session (by opening an IE window) : Online_Users has increased.
But when I close this window, Online_Users still remain, not decrease.

View Replies


ADVERTISEMENT

Counting Users

I am trying to work out how to set up two counters on my site, one to track guest users and one to track registered users, like most forums show. There are loads of examples showing how to use the global.asa file to do a single active user count, but I can't find anything for my needs.

Has anyone come across such a script, or give me a clue how to write my own? All registered users are marked by a session variable called userLogged - which is true if they have logged in.

View Replies View Related

Global .asa Counting Users

I have this line of code in my global.asa Application("Active") = Application("Active") + 1 . I open alot of new IE windows and I have my homepage set to my intranet that contains the above code. I had the same code in my IIS5 web and I don't remember it counting me each time I came in. I know it did if I would close all IE and open a new one but not if I had one opened then opened a new one. Is there something diferent here in IIS6?

The homepage is behind authentication and it makes me authenticate with any new IE window. Is there a setting missing? I thought IE would cache the permissions.

View Replies View Related

HOw Many Users Online

how can i tell how many users are browsing ?

View Replies View Related

Users Online

Is it possible (and if so how), to show a 'users online' counter on my site(VB ASP)?I have seen lots of site that say, xxx members online and xxx guests online. How can I do this?

View Replies View Related

Online Users Script?

I have just finished making the basic login/register bit to my new site , i want to make a online users script to show members online and visitors online (how many)

How would this be done as global.asa cant hold asp coding so it can only cold visitors not members.

View Replies View Related

Count Of Online Users...

How can i know how many users are online using asp? i'm using abyss web server with Activehtml and i can't use the Global.asa file.

View Replies View Related

Counting Number Of Download

On a site, I've documents that can be downloaded.
To fill the html page, I read a table in an access database and I write my
code
Each document has a title, an url, an id and a variable "counter"
How can I increment the counter (in the database) and open the docuemnt in
the same operation

View Replies View Related

Counting The Number Of Rows

I need to count the number of rows in a table, and set the number to a variable so I can use it as a sentinel for a control loop . I know I'm supposed to use Count(*) but i'm not quite sure of the syntax. for i=1 to (the number of rows in the table) if breakloop=true then exit for (CODE) next .

View Replies View Related

Display Online Users And Last Logins

I need to display the # of online users on my system, as well as the 10 users that last logged in at that moment....How would I do this? Im sorry if question is vague but I've never done this before and I've no idea how to do it. Will I be needing an application variable? Do I have to use it on a global.asa file?

View Replies View Related

Displaying A List Of Current Users Online

my website requires users to login with username and password on the homepage before they can access the content on the site.

I want to be able to display a list of users who are currently online. Can anyone offer any suggestions as to what is the best way to go about this.

I know I can create a session variable for each user when they log on to hold the users name but how can I display all the users together in a list? Also how do I refresh this list (say every minute)?

View Replies View Related

Working With Dates : Counting Number Of Days

I am trying to impliment a feature in an ASP webpage that will basically count the number of days between when a projects specific start date is entered and when it is completed (completion date) I want my page to show how many days the project took to complete. Is there an easy way of doing this ? I am using an ACCESS database .

View Replies View Related

Number Of Online Visitors

Have anyone tried the number-of-online-visitors standard script? I am using it for two of my sites (on application start and sessions start and end, etc.). Yet I notice that the script shows a larger number than the real one! If there are 30, it says there are 200!

Any idea why this happens? Timeout is set to 20 minutes I guess.

View Replies View Related

Logging Users :: Transactions My Users Perform

I want to be able to log in a database any transactions my users perform. For example logging in, requesting a page, downloading a resource, logging out etc.

What is the most practical way to code this? I was thinking of trying to use an include file which would have a function to add a log in the database for each page on the site or when a particular action is performed.

View Replies View Related

Convert Real Number Into Text Number

I need to insert some number into database as text. My problem is if I insert the number (ie. 4.0), the value in the database only show (4). So, is it possible to convert a real number into text number using ASP?

View Replies View Related

Counting

Code:

<%
sub number()
dim number
number = number + 1
Response.Write("Number = " & number)
number()
end sub
%>

This adds one the first time but when the script returns to this part of the script the value remains constant.

View Replies View Related

Counting Records

- i have a db with a "category" field
- there are 5 categories: sports, computers, furniture, collectors, others

i want to get the total number of records for each category.
how do i start doing this?

View Replies View Related

Counting Hits

I fould this code on another page and have included it on may main page. I would like to know 2 things. How can i cange the database connection to DSN less and i would like to know how i can add code to get the total hits and add it to a Field called "totalhits" in my access database. Code:

View Replies View Related

Counting Records

Is there another way to count the records of an access database that have a specific field other than using a SELECT statement and a recordset to loop through the records?

View Replies View Related

Display Counting

i have to display the count and it always says 0 even when the count is 3 or 4

any ideas here is the code:

Set rscheck = Server.CreateObject("ADODB.RecordSet")
strcheck="select Count(*) from tblpdf where pdf_id='" & pdfid & "'"
rscheck.Open strcheck, Conn,2,2
counting=rscheck(0)


Response.write counting.

View Replies View Related

Counting Records As -1!

On access, I used the simple recordcount property, but on mySQL, all the counts turn to -1...here's my code for one of them:


[VBS]
set Count = Server.CreateObject("ADODB.Recordset")
sqlSelect = "SELECT * FROM Articles WHERE Pending = 'No';"
Count.Open sqlSelect, Connect, adOpenStatic, adLockReadOnly
%>
We have <b><font color="red"><%=Minus(Count.RecordCount)%></font></b> articles!
<%Count.Close
set Count = Nothing
[/vbs]

View Replies View Related

Counting For Dummies

I am using a lot ASP to manage a db for the students I work with in a YMCA program. What do I need to change to be able to count and print the # of records (like on a roster)

<%
fp_sQry="SELECT * FROM Results WHERE (Grade = 'Senior') ORDER BY Club ASC"
fp_sDefault="Club="
fp_sNoRecords="No records returned."
fp_sDataConn="2004"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=125
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_iDisplayCols=23
fp_fCustomQuery=True
BOTID=0
fp_iRegion=BOTID
%>

View Replies View Related

Counting Clicks

What is the best way to count how many times an image has been clicked?
I have an image gallery on a site and want to count how many times each
image has been clicked (clicking pulls up the full size image in a window)
so that I know which are popular and which are not.
I though about wimply adding an extra field to the database which serves up
the image details, and incrementing a number by 1 each time a user clicks it
just before the image is served up. What are the chances of this falling
over if two people were to click the same image at the same time?

View Replies View Related

Counting Childnodes

I need to find the total number of nodes in a binary tree structure ( Its for a mlm website), Also I need to count the total subnodes in leftside and right side separately.

Check the attachments, You will get the idea. Attachment contains database structure and Binary Tree Structure.

View Replies View Related

Counting DB Rows

For example:
If I had a table with the headings
ID Colour Car
1 Blue Volvo
2 Red Fiesta
3 Green Mondeo
4 Red Volvo
5 Red Fiesta
6 Blue Fiesta

How could I use asp to count how many times say the colour red appeared in the table displayed in a numeric value, i.e There are 4 red cars in the able

View Replies View Related

Counting Rows

i know that in sql you can output the amount of rows with COUNT(col_name), but what asp do i need to output this

View Replies View Related

Counting Recods

I have a access data base that has several records. One filed contains a category numbers. Many of the records have the same category number becase they belong to the same category. How can I get the number of records that have the same category number? or should I say how can I count the records wich have the same category number?

View Replies View Related

Counting & Access DB

Access database. What is the best method to count a field that has the numbers 1 - 93 in it, over 1008000 rows long. Trying to obtain how many times 1, 2, 3 etc show up in this field.

View Replies View Related

Counting Records

I have fields called EventName and EventVolunteer. What I want to do is do a count of volunteers for each event. Then as it loops though the database the results display next to the Event Name.

View Replies View Related

Counting Visits

I would like to how to count the number of visits a person makes to a particular asp page. Let me give an example. Suppose a person is participating in an e-discussion.

we would like to know the number of questions he has answered, the number of questions he has just seen but not answered and the number of questions not at all seen by him.

View Replies View Related

Counting In Loop

I'm trying to count the number of occurances of a product as it is outputted from a database (the information has been split from the quantity so can't just use SQL)

I use - if RecordArray(0)="ProductName" then productoccurance=productoccurance+ProductQuantity

It counts some an not others or only a few. But the result is the same everytime. E.G, I have 10 occurances of product1 in the database the this script only ever counts 4. Any ideas as to what's wrong?

View Replies View Related

Counting Days

I need to display the count of days on the page where the start date is the result of the record set and the end date is the current date. So if the record set value was 3/04/2007 than the display on the page would be "3" ( with todays date: 3/07/2007 as the end date). I know I need to use datediff(d,???? ) you can see where I get lost.

View Replies View Related

Counting With Time

I am trying to count with time, like you can count with a date, but it's not working

In date I would do: DateValue(Now)+1

when I Do TimeValue(Now)+30, it does not display what the time would be 30 seconds later, but instead it shows me the time it is right now and sticks a weird date (1-1-1900) in front of it, what am I doing wrong?

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved