View Single Post
  #2 (permalink)  
Old 07-09-09, 02:31 PM
ruteckycs's Avatar
ruteckycs ruteckycs is offline
Coding Addict
 
Join Date: Jul 2009
Posts: 377
Thanks: 6
Thanked 10 Times in 10 Posts
You could use a simple PHP script, here is a very simple one that would work.
PHP Code:

<?php
$myFile 
"count.txt";
$fh fopen($myFile'r');
$The_Count fread($fhfilesize($myFile));
fclose($fh);

If (
$The_Count!="5"){
                                            
$The_Count=$The_Count+1;
                                            
$myFile "count.txt";
                                            
$fh fopen($myFile'w') or die("can't open file");
                                            
fwrite($fh$The_Count);
                                           
fclose($fh);
}else{
$The_Count=0;
$myFile "count.txt";
$fh fopen($myFile'w') or die("can't open file");
fwrite($fh$The_Count);
fclose($fh);
header("Location: lpagehere.html");
}
?>
Sorry dont know how to highlight the PHP code on this forum.

Last edited by Nico; 07-10-09 at 03:54 AM.
Reply With Quote