PHP to screw with Bots?

edro

Lifer
Apr 5, 2002
24,326
68
91
I run a non-profit organization's forum.
It was overrun with porn/advertising bots a few years back when I took over.
I added a CAPTCHA and changed some URLs and they have been held at bay so far.

I still get TONS of hits from seemingly random IPs to:
URL/forum/index.php
and
URL/user/user

Is there any kind of PHP file I can write that would screw them up? :)
I doubt it, but maybe some of you know a way to stop all of these hits.

You would think that after 2 years of 404 messages, the bots would stop trying.
 

Ka0t1x

Golden Member
Jan 23, 2004
1,724
0
71
If using apache, mod_rewrite could work, just point them somewhere else (homepage?).. but honestly if they're getting 404'd why would it matter?


In php:
Code:
<?php
    header("Location: http://www.google.com");
?>
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
404 is a much lower load on the server than running a PHP script to deliver a response. Are you sure you want to increase the load and take the resources away from real users?
 

edro

Lifer
Apr 5, 2002
24,326
68
91
Yeah, good points.

I just hate having my logs all filled up with failed CAPTCHA attempts and 404 messages.
There are so many 404s, it's tough to find legitimate 404 entries from real users that may indicate a bad link on the site.
 

Ka0t1x

Golden Member
Jan 23, 2004
1,724
0
71
Do you have AWStats or something running? It would be fairly easy to pick out the URLs for 404s with a log analyzer.