Someone please help
Iv been looking all over for just a SIMPLE text counter than counts the number of times a link has been clicked.. thats it.. all it displays is a number
please help!


<?$count = implode( '' , @file('/downloads/filename.zip.counter' ) ) ;?>
<a href="blah.com/download.php?file=filename.zip>download</a> (<?=$count;?> downloads to date)
<?
//check its a file & USE ABSOLUTE PATH
if( file_exists( '/home/username/downloads/'.$_REQUEST[file] ) ){
$count = trim( implode( '' , file('/downloads/'.$_REQUEST[file].'.counter' ) ) );
$fp = fopen( '/downloads/'.$_REQUEST[file].'.counter' , 'w' ) ;
fputs( $fp , ($count+1) ) ;
fclose( $fp ) ;
}
?>
Comment