Here's an example of what this would look like...
$data = fopen($file, "r");
$last_date = file_get_contents($file2);
$count = fread($data, filesize($file));
fclose($data);
$cur_date = date('mdY');
if ($last_date != $cur_date) {
file_put_contents($file2, $cur_date);
// reset the counter to zero for the new day
$count = 0;
}
$count = $count + 1;
$data = fopen($file, "w+");
fwrite($data, $count);
fclose($data);
Also note that both values could be stored in the same file with a little parsing... like seperating them by a new line or period or some other character...