SKI klub Kaštela
www.ski.kastela.org
E-mail:
ski@kastela.org
POČETNA
|
KONTAKT
|
LINKOVI
Untitled Document
//$countfile = "hitcounter.dat"; // Check, File Exist or not, for Count storage if (file_exists($countfile)) { $fp = fopen($countfile, "r"); // Open the file $output = fread($fp, filesize($countfile)); // Read and get the count fclose($fp); // Close the file $count = intval($output); // Make sure the value is a number ShowCount(); } else { echo ("nema file ..."); // No file was found; $count = 0; } function ShowCount() { global $ShowCount, $countfile, $count; if ( !isset($_GET['page']) ) { $count++; // Increment 1 } $fp = fopen($countfile, "w"); fwrite($fp, $count); // Save the new count fclose($fp); // Close the file //$ShowCount = $count; //return $ShowCount; } ?> posjeta
© 2004. SKI klub Kaštela