Jump to content
xisto Community

jsuthers

Members
  • Content Count

    1
  • Joined

  • Last visited

  1. Add this to the page you want to count the visitors on: <?php$logfile="counter.txt";$returnpage = htmlentities($_GET['count']);if (! @$file = fopen($logfile,"r+")){$count="1";}else{$count = @fread($file, filesize($logfile)) or $count=0;fclose($file);$count++;}$file = fopen($logfile,"w+");fputs($file, $count);fclose($file);?> The link to the page you want to count the visitors should be http://ww38.yoursite.com/yourpage.php?count The visitors numbers will be saved in counter.txt Add this to the page where you want to show how many visitors the page have had: <?php$logfile="counter.txt";if (! @$file = fopen($logfile,"r+")){$count="0";}else{$count = @fread($file, filesize($logfile)) or $count=0;fclose($file);}echo 'Visitors: <font color="#FF6600">'.$count.'</font>.';?>
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.