|
Last updated: 02/22/2012
Most spammers are attempting to post links to urls they want you to click on, or get posted to a website.
By taking advantage of this trait, you can block spammers by checking for any url's in the incoming form fields, like so:
foreach($_REQUEST as $var => $val) {
if(strpos($val,"http://") !== false) {
// print out an error here, or return to form
}
}
If you need to allow a url in a specific field, you can exclude that field from checking in the loop above.
blog comments powered by
|