<?php
require_once 'config.php'; // Include config file.
require_once 'hit.php'; // Record the hits to this page
$selectHits = mysql_query("SELECT * FROM `stats` WHERE `date` = '" . $time . "' GROUP BY `ip`") or die(mysql_error()); // Select stats from today
$uniqueToday = mysql_num_rows($selectHits); // Count uniques today
$hitsToday = mysql_result(mysql_query("SELECT SUM(`hits`) as total FROM `stats` WHERE `date` = '" . $time . "' GROUP BY `date`"), 0, "total"); // Count total hits today
$totalUHits = mysql_result(mysql_query("SELECT COUNT(`hits`) FROM `stats`"), 0); // Count total unique hits
$totalHits = mysql_result(mysql_query("SELECT SUM(`hits`) as total FROM `stats`"), 0, "total"); // Count total hits
$diff = time() - 300;
$countOnline = mysql_query("SELECT * FROM `stats` WHERE `online` > '" . $diff . "'") or die(mysql_error());
$countOnline = mysql_num_rows($countOnline);
?>
<!-- Echo stats below -->
Total Hits: <?php echo $totalHits ?><br />
Hits Today: <?php echo $hitsToday ?><br />
and im wondering like a list would be done saying what the user has been on and what time.. like the one featured here: http://katz.ws/on/usersonline.php (non advertisement puposes)
