Login   Register  
PHP Classes
elePHPant
Icontem

File: info.txt

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of streamloaders  >  online_users_pro  >  info.txt  >  Download  
File: info.txt
Role: ???
Content type: text/plain
Description: Note from the Creator
Class: online_users_pro
update for the previous class of bmpc@netcabo.pt
Author: By
Last change:
Date: 12 years ago
Size: 1,091 bytes
 

Contents

Class file image Download
bmpc@netcabo.pt


This class was written to support multiple databases with a database wrapper module. I converted it for
MySQL in order to be published, without the calls to the wrapping functions.


To use it, you'll need to create an instance of the "users_online" class, like

	$o_user = new users_online ( $REMOTE_ADDR );

The $REMOTE_ADDR contains the IP address of the user.


Then, the "main" method must be called. This method calls the necessary methods for the algorithm to work
properly.


---------
Algorithm
---------

This is a timeout approach that allows us to have a count of the number of users on a website at a given 
time. It's not 100% accuratte.

Description:

(start)
	(log users ip)
	(check the database for the user's ip)
	(if the ip exists)
		(update the timestamp)
	(if the ip does not exist)
		(insert a new record)
	(delete all records that have timeouted)
(end)


Updated by: Tha Chief - Hellraiser
Date: May 15th, 2002
Email: dutchmoviez@hotmail.com

Just a 'minor' update so the counting stays what it should be !!!