Current location: Hot Scripts Forums » Programming Languages » PHP » howmany people online?


howmany people online?

Reply
  #1 (permalink)  
Old 10-31-05, 08:53 AM
winny winny is offline
New Member
 
Join Date: Oct 2005
Location: Amsterdam
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Question howmany people online?

Hello, evryone..

I am Winny and this is my first post here.
I am Dutch so my english may have some strange things in it.
Here is my problem:
I am a webdesigner and for one of my websites I am looking for a script, that only tells the visitor how many people are visiting the site at the moment this visitor is there.
So if someone is leaving, the number should be changed in one less.
I do have counters and statistics .
Hope anyone can help me??

groet, Winny
Reply With Quote
  #2 (permalink)  
Old 10-31-05, 09:15 AM
karlcore karlcore is offline
Newbie Coder
 
Join Date: Nov 2003
Posts: 82
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by winny
Hello, evryone..

I am Winny and this is my first post here.
I am Dutch so my english may have some strange things in it.
Here is my problem:
I am a webdesigner and for one of my websites I am looking for a script, that only tells the visitor how many people are visiting the site at the moment this visitor is there.
So if someone is leaving, the number should be changed in one less.
I do have counters and statistics .
Hope anyone can help me??

groet, Winny
How are your users helped by knowing how many other people are on your site?
Reply With Quote
  #3 (permalink)  
Old 10-31-05, 11:14 AM
insertnamehere insertnamehere is offline
Newbie Coder
 
Join Date: Sep 2005
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by karlcore
How are your users helped by knowing how many other people are on your site?

Hmm... i don't think thats what hes asking u ****
Reply With Quote
  #4 (permalink)  
Old 10-31-05, 11:42 AM
nugensoftware's Avatar
nugensoftware nugensoftware is offline
Newbie Coder
 
Join Date: Oct 2005
Location: United States
Posts: 96
Thanks: 0
Thanked 0 Times in 0 Posts
the way i've done this in the past is with a database table, the users hostname, and a datestamp.

when the user visists for the first time write a record to the database and with NOW() for a standard datestamp then you can use DATE_SUB to get users from the past X minutes, usally 5-15. you can never truely tell if someone has left your site unless they take an action like 'log out' etc.

here is a link to to the MySQL help on DATE_SUB and working with dates (which is also time).

http://dev.mysql.com/doc/refman/4.1/...functions.html
__________________
Nugen Software Inc.
Lead Developer
www.nugensoftware.com

PHP HELP | MySQL HELP | xmlSYNC
Reply With Quote
  #5 (permalink)  
Old 10-31-05, 11:43 AM
mab's Avatar
mab mab is offline
Community VIP
 
Join Date: Oct 2005
Location: Denver, Co. USA
Posts: 2,674
Thanks: 0
Thanked 0 Times in 0 Posts
There should be something that meets your needs at -

http://www.hotscripts.com/PHP/Script...ime/index.html

I specifically use this one - http://www.hotscripts.com/Detailed/50964.html

Last edited by mab; 10-31-05 at 11:47 AM.
Reply With Quote
  #6 (permalink)  
Old 10-31-05, 11:45 AM
nugensoftware's Avatar
nugensoftware nugensoftware is offline
Newbie Coder
 
Join Date: Oct 2005
Location: United States
Posts: 96
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by karlcore
How are your users helped by knowing how many other people are on your site?
not all the objectives of every website is to 'help' the users. sometimes these types of statistics may be needed by the administrators.

if you were running a large web application with hundreds of users running it simutaneously, this would be information you could use to calculate the server load per user per minute per function etc. benchmarking so to speak.

just because a certain type of functionality doesn't make sense on your website doesn't mean it isn't useful to others.
__________________
Nugen Software Inc.
Lead Developer
www.nugensoftware.com

PHP HELP | MySQL HELP | xmlSYNC
Reply With Quote
  #7 (permalink)  
Old 10-31-05, 12:30 PM
karlcore karlcore is offline
Newbie Coder
 
Join Date: Nov 2003
Posts: 82
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by nugensoftware
not all the objectives of every website is to 'help' the users. sometimes these types of statistics may be needed by the administrators.

if you were running a large web application with hundreds of users running it simutaneously, this would be information you could use to calculate the server load per user per minute per function etc. benchmarking so to speak.
If the OP was running a large web application with hundreds of users running it simultaneously, they'd already have the knowledge needed to answer their own question. Moreover, they'd have a staff that they could ask, and probably have the budget, access, and knowledge to buy a COTS solution that provides what data they're after.

You and I both know that what the OP was asking for was one of those "Look how kewl we are, we have 9 people online" scripts.
Reply With Quote
  #8 (permalink)  
Old 10-31-05, 07:24 PM
nugensoftware's Avatar
nugensoftware nugensoftware is offline
Newbie Coder
 
Join Date: Oct 2005
Location: United States
Posts: 96
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by karlcore
If the OP was running a large web application with hundreds of users running it simultaneously, they'd already have the knowledge needed to answer their own question. Moreover, they'd have a staff that they could ask, and probably have the budget, access, and knowledge to buy a COTS solution that provides what data they're after.

You and I both know that what the OP was asking for was one of those "Look how kewl we are, we have 9 people online" scripts.
that was an example of how else this information can be used besides displaying it to the user.

you are still wrong though. i just closed my 5 year running shoutcast station / community site, which would have between 500-800 people browsing the site and another 100-200 listening to the radio station at any given time. the staff was a graphic artist, a few musicians, and me (developer/server admin). there was no need to purchase or refer to staff with a budget to purchase retail software. there isn't a standard benchmarking sweat for custom configured servers or custom built software.

you obviously haven't written much software else you wouldn't be stating that people purchase retail "off the shelf" software for this, the truth is you can't benchmark a custom application with any off the shelf software. in my opinion your statement is an oxymoron when it comes to open languages like PHP & MySQL.
__________________
Nugen Software Inc.
Lead Developer
www.nugensoftware.com

PHP HELP | MySQL HELP | xmlSYNC
Reply With Quote
  #9 (permalink)  
Old 11-01-05, 09:23 AM
winny winny is offline
New Member
 
Join Date: Oct 2005
Location: Amsterdam
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs up

Quote:
Originally Posted by mab

I specifically use this one - http://www.hotscripts.com/Detailed/50964.html
Thank you very much!! This is exactly what I was looking for but I could not find it.
The main reason to use this script is that the people I make the site for, wanted it.

regards, Winny
Reply With Quote
  #10 (permalink)  
Old 11-01-05, 12:15 PM
karlcore karlcore is offline
Newbie Coder
 
Join Date: Nov 2003
Posts: 82
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by winny
Thank you very much!! This is exactly what I was looking for but I could not find it.
The main reason to use this script is that the people I make the site for, wanted it.

regards, Winny
To nugensoftware - I rest my case.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
The Art Nexus seeking PHP programmers TheArtNexus Job Offers & Assistance 5 02-26-08 03:08 AM
online business people wanted for chat forums FNxx General Advertisements 0 06-02-05 09:24 AM


All times are GMT -5. The time now is 06:18 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.