Forum Moderators: coopster

Message Too Old, No Replies

Help with Bad Bots Script

         

Jessica97

10:08 pm on Jun 14, 2008 (gmt 0)

10+ Year Member



Hi, I'm trying to get Alex's bad bot script running on a server that's getting hammered by downloaders, so I could really use some help. I'm not a coder but I do follow directions well, so if any of you php folks could help get me started by answering any of the following questions, it would be very much appreciated.

I would like to use the script so that anyone who is not whitelisted will be subject to the restrictions in Alex's code.

However because I'm not a coder, I don't know which parts of the code to keep and which parts to leave intact.

If anyone could look at the code and provide let me know what my complete php file for my blocking php file would be using the ipbased whitelist I'd really appreciate it. As the instructions are part of the code, I'm not sure If I'm supposed to just use the code starting on line 229-281 and replace all the code at the top, or if the white list code is supposed to be appended somewhere and if so, then what parts do I take out.

As an aside, if I do get this up and running I would be glad to write new instructions for the script so that other PHP challenged folks may be able to use it:-)

Thanks for your time.

[edited by: dreamcatcher at 11:35 pm (utc) on June 14, 2008]

[edited by: coopster at 9:35 pm (utc) on June 20, 2008]

coopster

9:29 pm on Jun 20, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



As an aside, if I do get this up and running I would be glad to write new instructions for the script so that other PHP challenged folks may be able to use it:-)

Have you contacted the script developer about that option? Perhaps you will get the assistance directly from the source if you were willing to contribute documentation? Sounds like a great idea to me!

AlexK

12:36 am on Jun 28, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hello Jessica97, my profound apologies for a long delay to your post (coopster sent a sticky to me giving the url of this post, and I have just read it).

In the short term, the answer to you is easy:

  1. Use the script as supplied & ignore the whitelist.
  2. Make the few necessary changes at the top of the code so that it is accurate for your server, and make sure that it does not throw any errors with a test script.
  3. Implement on a few pages, and check for a block log.
  4. Once happy, implement across your site.
  5. If you find entries in the block log that you do not want blocked, then (and only then) start looking to add a whitelist.

I personally do not use a white-list, and do not advise one, which is why it is not implemented within the main section of script. I have never observed any problem with legitimate site-scrapers (their other name is 'search-bots') on being given a 503 response. It does NOT affect your search-ranking. However, if you have a very busy site, and those bots keep appearing within the block-log, it is far better to switch off the slow-scraper block (simply set
$bTotVisit = 0
). If any bot scrapes fast enough to trip the fast-scraper block, then it needs to be blocked, no matter who it comes from, else your site will become inaccessible.

See also the small section at the end of my previous post [webmasterworld.com].