What exactly do you mean how many people are online? Are these people logged into a paticular system in anyway? Are you running a database with seshion cookies maybe?
Or are you simply just displaying a flat page and want to show who's online (without anyone logging in), therefore impossible?
Cheers
- wil
Peter J. Boettcher posted this at 13:31 — 9th January 2002.
You don't really know who's online, only that there is someone online. It can be a little deceiving, for example, I could open 2 browser windows and browse the site, and it would say "2 users online" when there's really only one. It would be more accurate to say "2 current connections to the web service".
Oh, right! That's simple enough! Sorry, I thought the user was asking how do I do a "Who's Online" script, like naming logged users such as the one on this front page (I think - haven't looked in a while). That would be impossible without some sort of seshions.
- wil
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.
Peter J. Boettcher posted this at 21:35 — 8th January 2002.
They have: 812 posts
Joined: Feb 2000
We'll need to know what scripting language you're using...
Brykess posted this at 23:57 — 8th January 2002.
They have: 50 posts
Joined: Aug 2001
Yes, sorry, I am using perl.
Wil posted this at 09:46 — 9th January 2002.
They have: 601 posts
Joined: Nov 2001
What exactly do you mean how many people are online? Are these people logged into a paticular system in anyway? Are you running a database with seshion cookies maybe?
Or are you simply just displaying a flat page and want to show who's online (without anyone logging in), therefore impossible?
Cheers
- wil
Peter J. Boettcher posted this at 13:31 — 9th January 2002.
They have: 812 posts
Joined: Feb 2000
Its quite easy to do what you want in ASP, I'm not sure how to achieve this in perl though, sorry.
Brykess posted this at 20:45 — 9th January 2002.
They have: 50 posts
Joined: Aug 2001
How can u do this in asp? What script would u use?
Peter J. Boettcher posted this at 20:57 — 9th January 2002.
They have: 812 posts
Joined: Feb 2000
Add this to your Application_OnStart in global.asa
Application("CurrentUsers") = 0
Add this to your Session_OnStart in global.asa
Application.Lock
Application("CurrentUsers") = Application("CurrentUsers") + 1
Application.Unlock
Add this to your Session_OnEnd in global.asa
Application.Lock
Application("CurrentUsers") = Application("CurrentUsers") - 1
Application.Unlock
Then to display this on a page just put
<?php
=Application("CurrentUsers")
?>
PJ | Are we there yet?
pjboettcher.com
Brandon posted this at 21:03 — 9th January 2002.
They have: 27 posts
Joined: Nov 2001
heres one to check out.
http://ss.animetrek.com/UzerzOnlyne.php
Wil posted this at 09:47 — 10th January 2002.
They have: 601 posts
Joined: Nov 2001
But how can you know who's online if you don't use some sort of seshions? No one is 'logged in' anywhere?
Peter J. Boettcher posted this at 14:13 — 10th January 2002.
They have: 812 posts
Joined: Feb 2000
You don't really know who's online, only that there is someone online. It can be a little deceiving, for example, I could open 2 browser windows and browse the site, and it would say "2 users online" when there's really only one. It would be more accurate to say "2 current connections to the web service".
PJ | Are we there yet?
pjboettcher.com
Wil posted this at 14:32 — 10th January 2002.
They have: 601 posts
Joined: Nov 2001
Oh, right! That's simple enough! Sorry, I thought the user was asking how do I do a "Who's Online" script, like naming logged users such as the one on this front page (I think - haven't looked in a while). That would be impossible without some sort of seshions.
- wil
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.