예제 #1
0
 public static function startFilter($ip_id)
 {
     //we only do the other checks, if the first ones have failed.
     //we will return the variable filter, if the $filter returns TRUE, when the click is inserted and recorded we will insert the new click already inserted,
     //what was lagign this query is before it would insert a click, then scan it and then update the click, the updating later on was lagging, now we will just insert and it will not stop the clicks from being redirected becuase of a slow update.
     //check the user
     if (!FILTER::checkUserIP($ip_id)) {
         if (FILTER::checkLastIps($ip_id)) {
             return 2;
         }
     } else {
         return 1;
     }
     return 0;
 }
예제 #2
0
 function startFilter($db, $click_id, $ip_id, $ip_address, $user_id)
 {
     //we only do the other checks, if the first ones have failed.
     //we will return the variable filter, if the $filter returns TRUE, when the click is inserted and recorded we will insert the new click already inserted,
     //what was lagign this query is before it would insert a click, then scan it and then update the click, the updating later on was lagging, now we will just insert and it will not stop the clicks from being redirected becuase of a slow update.
     //check the user
     $filter = FILTER::checkUserIP($db, $click_id, $ip_id, $user_id);
     if ($filter == false) {
         //check the netrange
         $filter = FILTER::checkNetrange($click_id, $ip_address);
         if ($filter == false) {
             $filter = FILTER::checkLastIps($db, $user_id, $ip_id);
         }
     }
     if ($filter == true) {
         return 1;
     } else {
         return 0;
     }
 }