title: PHP Hit Counter with DATE
body: <p>I'm using the following code for an hit counter:</p>
  
  <pre><code>$fp = fopen("counterlog.txt", "r"); 
  $count = fread($fp, 1024); 
  fclose($fp); 
  $count = $count + 1; 
  $fp = fopen("counterlog.txt", "w"); 
  fwrite($fp, $count); 
  fclose($fp); 
  </code></pre>
  
  <p>In the file I only have a number, but I would like to obtain a file in the following way:</p>
  
  <pre><code>18/09/2015  10
  19/09/2015  11
  </code></pre>
  
  <p>So I want the count grouped by day and date separated by a tab.</p>
  
  <p>I know I can use database for doing that, but in this specific case I want to use only text file. </p>
  
  <p>Is possible to obtain that?</p>