Solved

How many Users connected ?

Posted on 2010-09-24
4
310 Views
Last Modified: 2012-05-10
Hi Experts !

Do you know a PHP function/ class to point out how many users are connected at the site ?

Thanks in advance.
0
Comment
Question by:Eduardo Fuerte
  • 2
4 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 200 total points
ID: 33754279
in short: it's not really possible to know, because web pages are stateless. you cannot really know when a user stops looking at the page, closes the browser, turns off the pc etc ...you might check this out, though:http://snipplr.com/view/24198/how-many-users-are-connected-to-a-site/
0
 
LVL 6

Assisted Solution

by:neorush
neorush earned 50 total points
ID: 33756173
angelIII has it correct that it is difficult to get an exact number, and a better description of the number is actually that "X people have loaded a page from the site in the last Y seconds." angelIII's example uses a file to track this, but it can be done with a database, using php's session storage files, or even apache's log files.
0
 

Author Comment

by:Eduardo Fuerte
ID: 33756393
Hello

Here where I'm now I have very restricted access to internet - fortunatelly Experts Exchange is free,
So I couldn't see yet angellll solution. If possible coud you give me the PHP code to obtain it, even it is an merely aproximate number of users connected ?

Thanks in advance.


0
 

Author Closing Comment

by:Eduardo Fuerte
ID: 33764586
Explained what I need. Thanks !
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

770 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