{"id":9,"date":"2007-06-05T17:21:05","date_gmt":"2007-06-05T22:21:05","guid":{"rendered":"http:\/\/www.popmartian.com\/tipsntricks\/2007\/06\/05\/stop-auto-bots-in-phpbb-cheap-easy-bot-stopper\/"},"modified":"2009-04-28T16:34:42","modified_gmt":"2009-04-28T21:34:42","slug":"stop-spam-bots-in-phpbb-cheap-easy-bot-stopper","status":"publish","type":"post","link":"https:\/\/www.popmartian.com\/tipsntricks\/2007\/06\/05\/stop-spam-bots-in-phpbb-cheap-easy-bot-stopper\/","title":{"rendered":"Stop spam-bots in PHPBB 2.x.  Cheap, easy BOT stopper"},"content":{"rendered":"<blockquote><p>WARNING!\u00c2\u00a0 As of this writing, this information pertains to the 2.x branch of phpBB.\u00c2\u00a0 I strongly recommend you upgrade to the latest phpBB.\u00c2\u00a0 As of April 28, 2009 that version is 3.0.4.\u00c2\u00a0 Please see <a href=\"http:\/\/phpbb.com\">http:\/\/phpbb.com<\/a><\/p>\n<p>NOTICE: I have an updated phpBB patch for the 3.0.x version of phpBB.\u00c2\u00a0 Please search this blog for phpBB or look at the phpbb category for more tips and tricks.<\/p><\/blockquote>\n<p>In your active template file profile_add_body.tpl find the line:<\/p>\n<p><code> <\/code><\/p>\n<pre>&lt;!-- Visual Confirmation --&gt;<\/pre>\n<p><strong>ABOVE<\/strong> that line, add:<\/p>\n<pre>&lt;!-- BOT HACK --&gt;\r\n   &lt;tr&gt;\r\n      &lt;td class=\"row1\"&gt;&lt;span class=\"gen\"&gt;Are you a robot? *&lt;\/span&gt;&lt;\/td&gt;\r\n      &lt;td class=\"row2\"&gt;&lt;select class=\"post\" name=\"imarobot\"&gt;\r\n      &lt;option value=\"yes\"&gt;yes&lt;\/option&gt;\r\n      &lt;option value=\"yes\"&gt;of course&lt;\/option&gt;\r\n      &lt;option value=\"nope\"&gt;Humans choose this one&lt;\/option&gt;\r\n      &lt;\/select&gt; &lt;span class=\"gen\"&gt;Bot buster... choose the right one.&lt;\/span&gt;&lt;\/td&gt;\r\n   &lt;\/tr&gt;\r\n&lt;!-- BOT HACK --&gt;<\/pre>\n<p>In your forum file includes\/usercp_register.php find this section of code:<\/p>\n<p><code> <\/code><\/p>\n<pre>   else if ( $mode == 'register' )\r\n   {\r\n      if ( empty($username) || empty($new_password) || empty($password_confirm) || empty($email) )\r\n      {\r\n         $error = TRUE;\r\n         $error_msg .= ( ( isset($error_msg) ) ? '&lt;br \/&gt;' : '' ) . $lang['Fields_empty'];\r\n      }<\/pre>\n<p><strong>AFTER<\/strong> that part, add this:<\/p>\n<p><code> <\/code><\/p>\n<pre>\/\/ BOT HACK\r\n         if ( empty($HTTP_POST_VARS['imarobot']) )\r\n         {\r\n            die('NO BOTS');\r\n         }\r\n         else\r\n         {\r\n            if ($HTTP_POST_VARS['imarobot'] != 'nope')\r\n            {\r\n               die('NO BOTS');\r\n            }\r\n         }\r\n\/\/ BOT HACK<\/pre>\n<p>And there you go.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WARNING!\u00c2\u00a0 As of this writing, this information pertains to the 2.x branch of phpBB.\u00c2\u00a0 I strongly recommend you upgrade to the latest phpBB.\u00c2\u00a0 As of April 28, 2009 that version is 3.0.4.\u00c2\u00a0 Please see http:\/\/phpbb.com NOTICE: I have an updated &hellip; <a href=\"https:\/\/www.popmartian.com\/tipsntricks\/2007\/06\/05\/stop-spam-bots-in-phpbb-cheap-easy-bot-stopper\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,11,16,17],"tags":[],"class_list":["post-9","post","type-post","status-publish","format-standard","hentry","category-how-to-do-stuff","category-php","category-phpbb","category-spam"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.popmartian.com\/tipsntricks\/wp-json\/wp\/v2\/posts\/9","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.popmartian.com\/tipsntricks\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.popmartian.com\/tipsntricks\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.popmartian.com\/tipsntricks\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.popmartian.com\/tipsntricks\/wp-json\/wp\/v2\/comments?post=9"}],"version-history":[{"count":5,"href":"https:\/\/www.popmartian.com\/tipsntricks\/wp-json\/wp\/v2\/posts\/9\/revisions"}],"predecessor-version":[{"id":100,"href":"https:\/\/www.popmartian.com\/tipsntricks\/wp-json\/wp\/v2\/posts\/9\/revisions\/100"}],"wp:attachment":[{"href":"https:\/\/www.popmartian.com\/tipsntricks\/wp-json\/wp\/v2\/media?parent=9"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.popmartian.com\/tipsntricks\/wp-json\/wp\/v2\/categories?post=9"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.popmartian.com\/tipsntricks\/wp-json\/wp\/v2\/tags?post=9"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}