Put this on the page you're counting dates:
Code:
<?php
$file = fopen('date.txt', 'a');
fwrite($file, " ".date("d/m/Y"));
fclose($file);
?>
Make a blank txt file named date.txt, and then where you want to add up all the dates, put this:
Code:
<?php
$file = file_get_contents("date.txt");
$file = explode(" ", $file);
array_shift($file);
$dates = array();
foreach($file as $key => $value){
if(!isset($dates[$value])){
$dates[$value] = 1;
} else {
$dates[$value]++;
}
}
foreach($dates as $key => $value){
echo $key . ' = '.$value .'<br />';
}
Bookmarks