$enter = date("d/m/Y"); @$fps = fopen("dekspots.enter", "r+"); while( ($item = trim(fgets($fps, 128))) ) $enter_stat[] = explode(",", $item); for ($a = 0; $a < count($enter_stat); $a++) if ($enter_stat[$a][0] == $enter) { $enter_stat[$a][1]++; break; } if ($a == count($enter_stat)) $enter_stat[count($enter_stat)] = Array($enter, 1); fseek($fps, 0); for ($a = 0; $a < count($enter_stat); $a++) fputs($fps, $enter_stat[$a][0].",".$enter_stat[$a][1]."\n"); fclose($fps); ?>