Jump to content
Sign in to follow this  
Max Castril

Viewer statistics

Recommended Posts

Hi all,

Some forum type websites show how many people are viewing at any one time - can you do that in php or do you have to use JavaScript?  HOW???

Any advice would be gratefully accepted.

Max

 

Share this post


Link to post
Share on other sites

In the database, you store the timestamp of their last activity, so any time they load a page or click on a link you save the timestamp in the database.  The number of people online is the number of people who have their last activity within a certain time range, like 10 or 15 minutes.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...