...

View Full Version : Hit Counting



Element
11-27-2005, 12:43 AM
Well... this just won't do. Every site has to have a hit counter snippet. xD I guess I'll have to throw one in. :D


<?php

if (gethostbyaddr($_SERVER['REMOTE_ADDR']) != null) {
$counterDB = "hits.dat";
$hits = file($counterDB);
$current = $hits[0]++;
$handle = fopen($counterDB , "w");
fputs($handle , $current);
fclose($handle);
echo '<b>Hits: '.number_format($current).'</b>';
}

?>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum