Really Simple Counter - This is a super simple page counter. |
<?php
// Name: Really Simple Counter Version 1.1
// Creator: Ronan Spoor - ronan@keykoder.co.uk
// Script found at https://snapbuilder.com code library
// Thanks - Ronan
// ------------------------------------------------
//
// Instructions:
// Include this file in any page you want the hit counts
// recorded on and in the place you want it to be shown.
// Sample:
// include ("count.php?show=true");
//
// If you don't want the hit count to be printed out then use this code.
// Sample:
// include ("count.php");
// ------------------------------------------------
// 13.03.2003 Markus Graf <gurix@web.de>
// still more simply
// ------------------------------------------------
$file = "/tmp/counter.dat"; // change this to the location of your counter file ????
$count = implode('',file($file)) + 1;
if(!($fp = fopen($file, "w"))) die ("Cannot open $file.");
fwrite($fp, $count);fclose($fp);
if ($_REQUEST["show"]) echo "You're visitor Number <b>$count</b>.";
// ------------------------------------------------
?>H!
|
Scroll