#native_company# #native_desc#
#native_cta#

A *Really* Simple Counter

By Graf Markus
on March 13, 2003

Version: 1.2

Type: Full Script

Category: Other

License: GNU General Public License

Description: Its so simple try it:

<?php
// Name: Really Simple Counter Version 1.1
// Creator: Ronan Spoor - [email protected]
// URL: http://www.keykoder.co.uk/download.php?download=count.zip
// Please email me suggestions to make this better/quicker
// 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 <[email protected]>
// 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!