Free script that helped me block 99% of fraudlent clicks (and avoid Ban)

Discussion in 'AdSense' started by Barti1987, Mar 20, 2008.

  1. #1
    A while ago one of my sites was banned, for unknown reasons (site was OK).

    I then switched to Bidvertiser, which were smart enough to notify me of invalid activity going on my site (click bombing), which I assume it was the same reason Adsense banned me for.

    I then wrote this simple, but effective PHP script that checks for certain number of hits in a specific timeframe for my other websites that contain Adsense,Bidvertiser and Adbrite.

    After the system was implemented, I started to see the click-bombers (almost 90 hits in less than 1 minute, from 10 different IPs).

    I thought I would give this script free of charge for those who might be interested.

    Depending on your settings, you might be blocking innocent users, so insure you play around with the and check your database for information.

    My basic settings were to allow 15 hits per minute (users on my site usually ~ 7).

    Open config.php, change as it suits you and then just include checker.php into the pages with ads.

    Suggestions, comments and criticisms are welcome:

    http://upload4ever.com/?Download*21b8e2158

    Requirements: 1 MYSQL & imagettftext/imagettfbbox (PHP)

    Peace,
     
    Barti1987, Mar 20, 2008 IP
    Scriptona likes this.
  2. poshswinger

    poshswinger Active Member

    Messages:
    2,527
    Likes Received:
    56
    Best Answers:
    0
    Trophy Points:
    90
    #2
    Any review on this script?
     
    poshswinger, Mar 28, 2008 IP
  3. cheaptraffic

    cheaptraffic Active Member

    Messages:
    398
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    60
    #3
    Nice, will try it out,

    Thanks
     
    cheaptraffic, Mar 28, 2008 IP
  4. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #4
    I have improved the script since the last posting by adding a "ban list" after specific clicks (the load was getting heavy, so I banned anyone who have visited my site over 100 times in one minute ~ 2 visits a second, must be a bot). I might update the link soon, when I have time.

    The upload site doesn't seem to be working, here is another link:

    http://www.megaupload.com/?d=3SE756BG

    Peace,
     
    Barti1987, Mar 28, 2008 IP
  5. visualjava1216

    visualjava1216 Peon

    Messages:
    333
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    i tried it,,, but the site link is overload,,,,
     
    visualjava1216, Mar 28, 2008 IP
  6. angilina

    angilina Notable Member

    Messages:
    7,824
    Likes Received:
    186
    Best Answers:
    0
    Trophy Points:
    260
    #6
    Will try it.
     
    angilina, Mar 29, 2008 IP
  7. Scriptona

    Scriptona Notable Member

    Messages:
    4,957
    Likes Received:
    265
    Best Answers:
    0
    Trophy Points:
    280
    #7
    I got it but still didn't apply it. I will check it later.

    but I have a question. why the package says +keygen ?

    Thanks.
     
    Scriptona, Mar 29, 2008 IP
    Barti1987 likes this.
  8. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #8
    It is some idiots trying to overload the website. I really can't do anything beside banning their IPs, however, they seem to be using an IP changer program.

    I just have to stop posting in the political/religion forums (some people just can't believe in freedom of speech).

    Use Megaupload download link.

    Peace,
     
    Barti1987, Mar 29, 2008 IP
  9. poshswinger

    poshswinger Active Member

    Messages:
    2,527
    Likes Received:
    56
    Best Answers:
    0
    Trophy Points:
    90
    #9
    Thanks for sharing~
     
    poshswinger, Mar 29, 2008 IP
  10. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #10
    Stupid move I know. I thought it would give it more attention.

    Peace,
     
    Barti1987, Mar 29, 2008 IP
  11. The Stealthy One

    The Stealthy One Well-Known Member Affiliate Manager

    Messages:
    3,042
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    105
    #11
    Has anyone tried this yet? Can anyone confirm it's working for them?
     
    The Stealthy One, Mar 29, 2008 IP
  12. uooser

    uooser Peon

    Messages:
    71
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #12
    When i need it i will try it,, thanks for sharing this AZIZNY.
     
    uooser, Mar 29, 2008 IP
  13. badar100

    badar100 Peon

    Messages:
    376
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Do Google warns you and/or bans you after the click bomb was on your site? Or before the payment day?
     
    badar100, Mar 29, 2008 IP
  14. Bryce

    Bryce Peon

    Messages:
    1,235
    Likes Received:
    93
    Best Answers:
    0
    Trophy Points:
    0
    #14

    I thought the only place click bombing freaks hung out was on the Official Adsense forums or maybe Talkgold.com forums :D

    btw, I'm interested in your script. I'm an experienced coder and I'd be interested in seeing what you've got going on. If you're having troubles with the upload, you can PM me and/or email me the script for you and I can put it on my dedicated server for download.
     
    Bryce, Mar 29, 2008 IP
  15. Kimosabe

    Kimosabe Active Member

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    86
    #15
    Your script is what i was searching for, but i can't make it work.


    I don't know much about php or mysql (nearly anything :), but it seems that the php is unable to connect to my database:

    Warning: mysql_query(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in...

    Warning: mysql_query(): A link to the server could not be established in.....

    Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in...


    Also, my host doesn't support imagettftext/imagettfbbox:
    Warning: imagecreatefrompng(): URL file-access is disabled in the server configuration in ... etc etc


    Could you please help me on installing this? Even without captcha protection it would be great! (eg replaced with a simple predefined text request like "how much is 2+3")

    Thank you for your time.
     
    Kimosabe, Apr 4, 2008 IP
  16. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #16
    I was banned and lost over $3,000. As always Adsense didn't tell me the reason, but after using Bidvertiser, I was notified about click bombing after a week, which I assume was the reason why Adsense banned me.

    I'll try to work on the script.

    Peace,
     
    Barti1987, Apr 4, 2008 IP
  17. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #17
    Barti1987, Apr 4, 2008 IP
  18. Kimosabe

    Kimosabe Active Member

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    86
    #18
    Thanks for the changes!

    Unfortunately i still can't get it to work.


    When checking, it shows the message:
    Parse error: parse error, unexpected T_STRING, expecting T_VARIABLE or '$' in /apache/users/*/******/guard/config.php on line 170

    i replaced the "line" with "$line", then it showed the following message:

    Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /apache/users/*/******/guard/checker.php on line 44


    Also, when testing validateuser.php with the text option enabled, after entering the answer, it shows "The requested URL /validateuser.php was not found on this server.".

    As i said i don't know much about php or sql, but could it be something with the database tables, or perhaps the fact my host doesn't support the fopen function?


    Thank you for developing this script, and sorry for constantly nagging you with "this doesn't work" posts. Its just that i was searching for such a solution for a long time and this looks very promising.
    Also, when this is complete and tested, i can upload it to my host, it doesn't have a bandwidth limit.
     
    Kimosabe, Apr 5, 2008 IP
  19. Abhik

    Abhik ..:: The ONE ::..

    Messages:
    11,337
    Likes Received:
    606
    Best Answers:
    0
    Trophy Points:
    410
    Digital Goods:
    2
    #19
    Cool script and really a great effort, but its needs some improvement.
    I still prefer OpenX.
     
    Abhik, Apr 5, 2008 IP
  20. visualjava1216

    visualjava1216 Peon

    Messages:
    333
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #20
    Can i have a free copy for review of the script,,,?:D
     
    visualjava1216, Apr 8, 2008 IP