View Single Post
  #4  
Old 11-25-2011, 07:58 AM
Csar Csar is offline
Member
 
Join Date: Oct 2011
Posts: 7
Gender: Male
Credits: 786
Csar is on a distinguished road
Default

Quote:
Originally Posted by SilverDragonTears View Post
Oh please tell me how!! i'm not sure I'll go that route... but if I have to...
Well, you wouldn't need to "block" the users but simply not count if they're eing referred, If I'm right you could use something like this:

PHP Code:
<?php
    $blacklist 
Aray(/*Terms that identify banned sites for example:*/ 'yarolds''google');
    
$click_allowed true;
    foreach (
$blacklist as $disallowedpage
        if (
strpos($_SERVER['HTTP_REFERRER'], $disallowedpage) !== false$click_allowed=false;
?>
Later you can just check against your prohibited pages, something like this
PHP Code:
<?php
    
if ($click_allowed) echo 'This is a normal user';
    else echo 
'You should not use any click services';
?>
If you would like to limit the number of clicks everyday you would need to add an extra table to your MySQL.

Hope it helped

C#
Reply With Quote