http://www.fsf.org/ or write * to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. * */ // Simple visitors counter!! require ("plugins/counter/configure.php"); // We take that cookie counter for tot hours setcookie("cmsdamcounter","1",time()+(60 * $counter_time)); $Hcounter = fopen ('plugins/counter/counter.dat', 'r+'); $visitors = 0; $visitors = trim(fread ($Hcounter, filesize ('plugins/counter/counter.dat'))); $vlen = strlen($visitors); // This make it working with register_globals = off $cmsdamcounter = $_REQUEST['cmsdamcounter']; // Check the cookie to see if visitor was already here $counter_time minutes ago // ++ if not setted if ($cmsdamcounter != 1) { // ++ $visitors++; rewind ($Hcounter); fwrite ($Hcounter, $visitors); } fclose ($Hcounter); echo $visitors; ?>