<?session_start(); functiongetUsersOnline() {$count = 0; $handle = opendir(session_save_path()); if ($handle == false) return -1; while (($file = readdir($handle)) != false) { if (preg_match("/^sess/", $file)) $count++; } closedir($handle); return$count; }?>