Clan Adverts

Stop points from updating on every page refresh

Description: This easy hack uses a cookie to make sure users are not abusing the point system by just refreshing the same page.
Version: 1.0
Added on: 17 April 2008
Author: Floppy
Difficulty Level: Very Easy
Views: 1642
Rating: 10.0 (1 Vote)
Detailed ProfileView Comments (1)

Open /includes/counter.php

Find

Code:
update_points(13);


Replace With
Code:
if(is_user($user)){
   $url = base64_encode($_SERVER['REQUEST_URI']);
   setrawcookie("urlcookie", $url);
   if($_COOKIE['urlcookie'] != $url){
      update_points(13);
   }
}


Save, Upload, and your done.