I pasted the following code into my template for my homepage (www.swava.net), but it says 0 guests and 0 users, even when I’m logged in. Is there something else I need other than this? I’m using a template I built from scratch.
<h1>Users Online</h1>
<p><i>There have been <?php echo count($usersonline)?> user(s), and <?php echo count($guestsonline);?> guest(s) online in the past <?php echo Config::Get(‘USERS_ONLINE_TIME’)?> minutes.</i></p>
<?php
/* $usersonline also has the list of users -
really simple example
Or if you’re not on the frontpage:
$usersonline = StatsData::UsersOnline();
foreach($usersonline as $pilot)
{
echo “{$pilot->firstname} {$pilot->lastname}<br />”;
}
*/
?>