• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Page view gesior

kafar1

New Member
Joined
Apr 4, 2013
Messages
78
Reaction score
1
I have problem with footer ..

Page has been viewed times. Load time: 0.0141 seconds

before times should be a number of views but it doesnt work idk why?? how to fix it?
 
my code
Code:
<div id="Footer">
             <?PHP
               $time_end = microtime_float();
               $time = $time_end - $time_start;
             ?>
             <?PHP echo getFooter() ?><br/>Page has been viewed <?PHP echo $page_views; ?> times. Load time: <?PHP echo round($time, 4); ?> seconds
           </div>
 
Do you have this in system/load.compat.php or are you using one of those old gesior versions? :p
 
Have you checked in config-and-functions.php if the code exists? If it doesn't then add the code I linked above.
 
config-and-functions.php
Code:
//PAGE VIEWS COUNTER :)
$views_counter = "cache/usercounter.dat";
// checking if the file exists
if (file_exists($views_counter))
{
  // het bestand bestaat, waarde + 1
  $actie = fopen($views_counter, "r+");
  $page_views = fgets($actie, 9);
  $page_views++;
  rewind($actie);
  fputs($actie, $page_views, 9);
  fclose($actie);
}
else
{
  // the file doesn't exist, creating a new one with value 1
  $actie = fopen($views_counter, "w");
  $page_views = 1;
  fputs($actie, $page_views, 9);
  fclose($actie);
}
 

Similar threads

Back
Top