title: PHP only Hit Counter?
body: <p>So, I used to play with web development many years ago, and I'm a little rusty, but not THAT rusty!</p>
  
  <p>I just made a full fledge video game page the other day using PHP variables to load different games into different size iframes. With that said, why on Earth can I not get a simple PHP hit counter to work? I have downloaded script after script after script, CHMOD'ed the txt file to 777, the whole 9. Does Chrome not support hit counters or something? It seems even the sites I visit that offer hit counters through them don't work on their demo pages!! What is the deal? I remember years ago, I copied about 10 very basic lines of code, saved it as a PHP file, uploaded it along with a blank txt file to a server, and bam, worked perfectly everytime. What has changed?</p>
  
  <p>Here's the code I'm using. By the way. I tried adding this into my index.html, I also tried using it as a separate php file and calling on it with INCLUDE, everything. Nothing seems to work.</p>
  
  <pre><code>&lt;?php
  
  $open = fopen(“hits.txt”, “r+”);
  $value = fgets($open);
  $close = fclose($open);
  
  $value++;
  
  $open = fopen(“hits.txt”, “w+”);
  fwrite($open, $value); // variable is not restated, bug fixed.
  $close = fclose($open);
  
  ?&gt;
  </code></pre>
  
  <p>and then where I want the results to be displayed, I have,</p>
  
  <pre><code>&lt;?php echo $value; ?&gt;
  </code></pre>
  
  <p>Any ideas?</p>