Reply to Re: php form problem

Your name:

Reply:


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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация