How can I have a counter that displays only today's (current day) hits/page views and it doesn't use mysql?

Here's an example of one that logs all page hits (not the ones for the current day):
PHP Code:
<?php
$stored 
"data/hits.txt"
function 
displayHitThingy($stored) { 
     
$fp fopen($stored,rw); 
     
$stuff fgets($fp,9999); 
     
fclose($fp); 
     
$fp fopen($stored,w); 
     
$stuff += 1
     print 
"$stuff"
     
fputs($fp$stuff); 
     
fclose($fp); 

?>
and to display it I just put

PHP Code:
Page Hits:  <?php displayHitThingy($stored); ?>