From b1747f08aa49494337570ea0cee44475ca118e33 Mon Sep 17 00:00:00 2001 From: Hannes Magnusson Date: Thu, 16 Apr 2009 14:13:03 +0000 Subject: [PATCH] Add an AI to detect spammers --- submit-event.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/submit-event.php b/submit-event.php index 6f2ec155b..ad83d9dcb 100644 --- a/submit-event.php +++ b/submit-event.php @@ -104,6 +104,11 @@ if ($process) { $errors[] = "You must specify a valid day of the month for a recurring event."; } + // Spam question + if ($_POST["sane"] != 3) { + $errors[] = "It's OK. I'm not real either"; + } + if (preg_match("/submit/i", $_POST["action"])) { // Submit to master.php.net $result = posttohost("http://master.php.net/entry/event.php", $_POST); @@ -240,6 +245,10 @@ if ($process && count($errors) === 0) { + + Are you real? + +