You may find the fileatime() command usefull it returns the timestamp for the required file.
<?
$filename=getcwd()."/fileaccess.php";
$timenow=mktime(date("H"), date ("i"), date("s"), date("m"), date("d"), date("Y"));
$diff=$timenow-fileatime($filename);
echo "<P>File was accessed ".$diff." seconds ago";
?>
I think that works.
Mark.