title: PHP - How many times the page has been viewed
body: <p>I want PHP to be able to echo the amount of times the page has been viewed. Being a server side scripting language I'm fairly confident there's a way.</p>
  
  <p>This is what I'm thinking...</p>
  
  <p>main.php</p>
  
  <pre><code>&lt;body&gt;
  &lt;?php
  include("views.php");
  $views = $views + 1;
  echo $views;
  ?&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>views.php</p>
  
  <pre><code>&lt;?php $views = 0; ?&gt;
  </code></pre>
  
  <p>This works, but does not update. (It will display 1, but will not keep counting upon refresh.)</p>