* @copyright Copyright (c) 2004 * @version $Id: online.class.php,v 1.1 2005/03/16 06:20:57 hatem Exp $ - 25/05/2004 14:04:22 - online.class.php * @access public **/ class online{ /** * Constructor * @access protected */ function online(){ } /** * * @access public * @return void **/ function who(){ $path = session_save_path(); if (trim($path)=="") { return FALSE; } $d = dir( $path); $i = 0; while (false !== ($entry = $d->read())) { if ($entry!="." and $entry!="..") { if (time()- filemtime($path."/$entry") < MAX_IDLE_TIME * 60) { $i++; } } } $d->close(); return $i; } } echo online::who(); ?>