1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to Block IP based on time spent on website (HOW TO DO THIS???)

Discussion in 'White Hat SEO' started by CoyoteAssassin, Jul 10, 2012.

  1. CoyoteAssassin

    CoyoteAssassin Elite Member

    Joined:
    Jan 3, 2010
    Messages:
    1,862
    Likes Received:
    3,906
    Occupation:
    Full Time IMer
    Location:
    USA
    How can I block an IP based on the number of page views or the time spent on a website?

    I am putting together a site that I know many will try to scrape so the more difficult I can make, the better.

    I'd like to restrict them to 50 page views and then require reCaptcha (or the build an image) and at 100 block their IP. I will need to have the option of putting in the IP of my computer and my developer so that we do not get hit with it.

    Any suggestions?
     
  2. Scripteen

    Scripteen Elite Member

    Joined:
    Sep 19, 2009
    Messages:
    1,811
    Likes Received:
    1,918
    Home Page:
    You can record every hit on your pages with the ip and user agent along with the time stamp in a mysql database and then count how many hits from this ip in the last xx minutes then block traffic based on the output or redirect it or show error message or show captcha or anything you wish.
     
    • Thanks Thanks x 1
  3. Lyscer

    Lyscer Junior Member

    Joined:
    Jun 29, 2012
    Messages:
    109
    Likes Received:
    46
    Occupation:
    Software Engineer
    Completely agree
     
    • Thanks Thanks x 1
  4. CoyoteAssassin

    CoyoteAssassin Elite Member

    Joined:
    Jan 3, 2010
    Messages:
    1,862
    Likes Received:
    3,906
    Occupation:
    Full Time IMer
    Location:
    USA
    Thanks guys. I'll pass that along to my developer and I'm sure he will know how to make that happen.
     
  5. CoyoteAssassin

    CoyoteAssassin Elite Member

    Joined:
    Jan 3, 2010
    Messages:
    1,862
    Likes Received:
    3,906
    Occupation:
    Full Time IMer
    Location:
    USA
    I contacted one of the developers about this and he said doing this method will hurt my rankings since the search engine cannot crawl all pages.

    Do you think Google search is able to get past captcha?
     
  6. Z0mbie

    Z0mbie Regular Member

    Joined:
    Jun 24, 2012
    Messages:
    339
    Likes Received:
    151
    I doubt it. But you can whitelist the google and bing spider user agents.
     
  7. Zapdos

    Zapdos Power Member

    Joined:
    Oct 22, 2011
    Messages:
    597
    Likes Received:
    708
    Location:
    Eastern North Carolina
    Be careful with this as google may think you're cheating by showing users content X and them/search engines content Y