okay i put a basic counter on my vbulletin forums, i placed this in phpinclude template (which is the only template which can parse php code)
PHP Code:
$counterfile "counterfile.txt";
if(!(
$fp = @fopen($counterfile,"r"))) die ("cannot open counter file");
$thecounter = (int) fread($fp20);
fclose($fp);
$thecounter++;
$fp fopen($counterfile"w");
fwrite($fp $thecounter);
fclose($fp); 
and referenced in my footer template

$thecounter

works for a while but resets itself ??? would changing
PHP Code:
fread($fp1024x1024); 
help?