| 
 Posted by Ken Robinson on 09/14/05 17:59 
Neil McDermott wrote: 
> Hi guys, 
> 
> As Ken says this thread is really useful and helped me a great deal. Thanks 
> Ken!!! 
> 
 
Here's the code I'm now using to try to thwart the spammers. 
 
<? 
foreach ($_POST as $k=>$v) 
if (strpos($v,'Content-Type:') !== false)  { // loop through all POSTed 
content looking for the string 'Content-Type:' 
// 
//  Mail tracking code removed (I email a tracking email with 
information back to myself) 
// 
    header("HTTP/1.0 404 Not Found"); // issue a 404 - page not found. 
Maybe this will stop the spambots from retrying my form every few hours 
 
} 
 
if (isset($_POST['submit']) && ($_POST['submit'] != 'Send Request')) { 
// check that the value passed by the Submit button hasn't been 
compromised 
// 
//  Mail tracking code removed (I email a tracking email with 
information back to myself) 
// 
    header("HTTP/1.0 404 Not Found"); // issue a 404 - page not found. 
Maybe this will stop the spambots from retrying my form every few hours 
} 
 
?> 
 
Ken
 
  
Navigation:
[Reply to this message] 
 |