PX : code

Text Counter by joe
Download this code


<?php 

   
//  created by joe lumbroso
   //  see some other good php3 scripts
   //  goto http://www.dtheatre.com

$counterFile =  "counter.txt"

function 
displayCounter($counterFile) { 
   
$fp     fopen($counterFile,rw);
   
$num    fgets($fp,5); 
   
fclose($fp); 
   
$fp     fopen($counterFile,w);
   
$num    += 1
   print  
"$num";
   
fputs($fp$num); 
   
fclose($fp); 


displayCounter($counterFile); 

?> 

Comments or questions?
PX is running PHP 5.2.17
Thanks to Miranda Productions for hosting and bandwidth.
Use of any code from PX is at your own risk.