//you might have to change the path eg //Using HTML tags or Styles change the output to match your site. //For example will cause the //numbers to be displayed as Bold. // //The variables $hitMessage1 & $hitMessage2 allows text to //be placed before and after the counter. Change this to //anything as long as the " "; are in place, for no message //leave the quotes empty ie $hitMessage1=""; // // There are two error messages in case bad things start to // happen when running this script. $readErr & $writeErr, //you may like to customise these to your own e-mail address. // // You are not limited to a single number in the count file try for example 00086 // //The script will store your own IP NUMBER AND WILL STAY THE SAME THE SAME EVERY TIME YOU LOAD THE PAGE so test everything is working set the variable $overRide to 1 this turns IP checking off. // Normal usage setting $overRide to 0 turns on IP logging. // //Done //----------------------------------------------------------------------- //echo "Executed"; //Set Variables $IPfilePath = "ip_data.dat"; // Path to IP number file $countFilePath ="count.dat"; //Path to Count file $overRide = 0;//Toggles IP logging: 0=On 1 =Off $readErr = "Read error, contact info@mustalweb.co.uk for help"; $writeErr = "Write error, contact info@mustalweb.co.uk for help"; $hitMessage1 ="Simple hit counter ";//Text before... $hitMessage2 =" override = ";// and after counter. //================= No need to change anything after here ======================== $IPnum = "0.0.0.0"; //Set as a String $userStatus = 0; // Get the current IP number ------------------------------ $IPnum = getenv("REMOTE_ADDR"); //echo $IPnum; //Get stored IP's from a file -------------------------------- $IPlist = @fopen($IPfilePath, "r")or die($readErr); $IPdata = fread($IPlist,filesize($IPfilePath)); fclose($IPlist); //Compare it to the ones stored in ip_data.dat --- $IParray = explode(" ",$IPdata); //Make array of IPs // Start comparing IPs for($ipCount=0;$ipCount