//Insert your call to the php3 script here just after the body tag
------------------------------
counter score =
visitors.
------------------------------
Free Php3/JavaScript provided by ©2003-VB'Breizh
WebSite
==============================================
@@@@@@@ php3 file (counter.php3) @@@@@@@
==============================================
//###############################
//
// Visitors/Counter (Php3) Version 1.0
// Copyright©2003-VB'Breizh
// web site : http://gilles.saunier.free.fr
// mail to : gilles.saunier@free.fr
//..........................................................................................................................
//Vous pouvez exploiter librement ce script et le perfectionner
//Si vous y apportez des améliorations notables,
//ayez la gentillesse de m'en faire part...
//
//###############################
// Php3 script - Installation
// php3-module needed on your provider server
// consult your provider documentation
// upload this php3-script using a ftp utility
// call to counter.php3 must be inserted in the body tags
// of your html file. (look at 'counter.html' code)
//
//###############################
$datafile="counter.txt";
if(!file_exists("$datafile")) {
$fp=fopen($datafile,"w"); // create file if it does'nt exist
fputs($fp,"0"); // initialize score
fclose($fp);
}
$fp = fopen($datafile,"r+"); // open data
$visits=fgets($fp,10); // read score
$visits++; // incrementation
fseek($fp,0); // insert position
fputs($fp, $visits); // save
fclose($fp); // close
// -------------document update
echo "document.write($visits);";
?>
---------------------------------------