Hi,
i am making a flash program for pocket pc, and i need to find out how many times the user has opened the flash application in a day (the more times the program is used in a day the "happier" the program gets).
so to do this (the pocket pc with wireless access) call a PHP page with the get url command which will increase a counter integer in a text file and display it.
i have written the following code to do this at the moment.
<?php
$f = fopen("./counter.txt", "r");
$data = fread($f, filesize("./counter.txt"));
fclose($f);
$count = (int) $data;
echo $count;
$count++;
$f = fopen("./counter.txt", "w");
fwrite($f, $count);
fclose($f);
?>
basically i need a way to reset the value to ZERO at the end of each day, whether this is calculated as 24 hrs or what im not sure.
I really have no idea how to do it so if any one knows how to reset a value based on time then help is appreciated.
Best Regards---Mitcho