You have a boss sucks.
Your going to get inaccurate times, I can tell you that. I wouldnt use cron, alothough I will admit im not quite sure why you were going to use cron.
SessionID
SessionTime
SessionURL
On every page if you just subtract the time.
session_start();
if (!isset($SessionID))
{
$SessionID = time();
$SessionTime = time();
$SessionURL = $PHP_SELF;
session_register("SessionID");
} else
{
$lastpage_Time = time() - $SessionTime;
$lastpage_URL = $SessionURL;
$SessionTime = time();
$SessionURL = $PHP_SELF;
}
Now do whatever your wise and oh mighty boss whats you todo with $lastpage_Time and $lastpage_URL.
problems.
What if a user goes to your site, index.php, then leaves, and comes back two days later? was he watching index.php for two days? nope. you might want to put some kind of excultion on it.
if ($lastpage_Time > 900)
echo "To long (15min), dont count<br>\n";
else
echo "User was viewing for $lastpage_Time<br>\n";
hope that helps.
Chris Lee