<?php
 
function AutoLoad($class) {
 
    require_once 'class.' . $class . '.php';
 
}
 
spl_autoload_register('AutoLoad');
 
$dbsh = new DBSessionHandler();
 
?>
 
<!doctype html>
 
<html>
 
<head>
 
<title>Database Session Handler</title>
 
<meta charset="utf-8" />
 
</head>
 
<body>
 
<?php
 
echo '<p>There are ' . $dbsh->onlineCount() . ' user(s) online.</p>' . PHP_EOL;
 
echo 'Online users: <br />' . PHP_EOL;
 
foreach($dbsh->onlineUsers() as $user) {
 
    echo $user . '<br />' . PHP_EOL;
 
}
 
?>
 
</body>
 
</html>
 
 |