#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    7
    Rep Power
    0

    How to prevent users to view more than 10 pages in my website (blog) within 24 hours.


    I have tracked some invalid click activity in my Adsense account. A malicious user is coming to my blog from different IP and clicking on my Ads multiple times. This user may be one of my competetor who want to ban me from Adsense. So I want to put a JavaScript cookies on his computer. It is now impossible to track him. Therefor I have decided to put a cookies on users computer and based on the cookies I will block him to view my website for about 24 hours, so that they will unable to click my ads multiple times. I want to allow the user to view only 12 pages of my website, then they will able to view my website after 24 hours. So that invalid activity on my website will decreases. Please help, I don't want to loose my precious Adsense account.
  2. #2
  3. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,957
    Rep Power
    1046
    Hi,

    so do you have a question? Or did you just want us to know?

    I mean, you do have to realize that your cookie only works if the "attacker" is stupid and also does each click by hand -- which is kind of unlikely. A slightly better idea would be to use multiple and less known techniques like virtual storage and Web SQL. But this again requires the attacker to actually use a browser.

    If you're dealing with intelligent people, there's virtually no way to stop them.
    The 6 worst sins of security ē How to (properly) access a MySQL database with PHP

    Why canít I use certain words like "drop" as part of my Security Question answers?
    There are certain words used by hackers to try to gain access to systems and manipulate data; therefore, the following words are restricted: "select," "delete," "update," "insert," "drop" and "null".
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    7
    Rep Power
    0
    I want to use this code in my blog. I am very serious to save my Adsense. I know that the attacker may have no knowledge to delete cookies and click in the ads again. So if possible give me this JavaScript code.
  6. #4
  7. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,957
    Rep Power
    1046
    Setting cookies with JavaScript is a well-document standard action. So please take 5 minutes to start up Google and do some reading:

    http://www.quirksmode.org/js/cookies.html

    If you got concrete questions, ask them. But please don't expect us to be your "code for free" service.
    The 6 worst sins of security ē How to (properly) access a MySQL database with PHP

    Why canít I use certain words like "drop" as part of my Security Question answers?
    There are certain words used by hackers to try to gain access to systems and manipulate data; therefore, the following words are restricted: "select," "delete," "update," "insert," "drop" and "null".
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    7
    Rep Power
    0
    It is not a matter of Free, but every one here is for helping each other. I have created a job website, which is free for my visitors. Wikipedia is free. That's why I expect help from each forum members. Thanks you, I like German because Germany is a liberal country and I like liberalism.
  10. #6
  11. A Not To Shabby Code Smurf
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Aug 2008
    Posts
    1,123
    Rep Power
    119
    Originally Posted by p1bdk
    That's why I expect help from each forum members.
    That statement will not get you help; maybe you put that in the wrong context, but no member is paid to be here. They just help each other; out of the kindness of the hearts. So please do not think anyone is required to help you. We do so, because we want to.

    But, the closest fix you could have for this issue; is banning IP addresses; that you found to be malicious (either completely banning them from your website or from being able to access you adverts), but if they are using any type of quality software or they are smart enough to use a proxy and/or dump and refresh/renew there own dynamic IP address; then it's going to be a tough go to ban them anyway. I think the HTML5 Storage API, would be the best bet; as Jacques1 stated... approaches like this are less known, but will become more known in the near future and at that time, that approach will no longer work and you will be right back to the the drawing board.

IMN logo majestic logo threadwatch logo seochat tools logo