Вверх

Блог
RSS лента

Средство борьбы от ботов в форуме PHPBB

Всех кого достал спам на форумах (phpbb) спасет ниже написаный код:

  1. #
  2. #-----[ ОТКРЫТЬ ]--------------------------------------------
  3. #
  4.  
  5. /include/usercp_register.php
  6.  
  7. #
  8. #-----[ НАЙТИ ]--------------------------------------------
  9. #
  10.   $username_sql = '';
  11.  
  12. #
  13. #-----[ ПЕРЕД, ДОБАВИТЬ ]-----------------------------------
  14. #
  15.  
  16. $from = 'АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ';
  17. $to = 'абвгдеёжзийклмнопрстуфхцчшщъыьэюя';
  18. $_POST['check'] = strtr($_POST['check'],$from,$to);
  19.  
  20. //Ответ должен быть в нижнем регистре, каждый символ!
  21. if ($_POST['check']!= "правильный ответ")
  22.  
  23. {
  24.    $error = TRUE;
  25.             $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . 'Вы должны правильно ответить на вопрос! Попробуйте еще раз.';
  26. }
  27.  
  28.  
  29. #
  30. #-----[ ОТКРЫТЬ ]--------------------------------------------
  31. #
  32.  
  33. /templates/subSilver/profile_add_body.tpl
  34.  
  35. #
  36. #-----[ НАЙТИ ]---------------------------------------------
  37. #
  38.  
  39. <!-- Visual Confirmation -->
  40.  
  41. #
  42. #-----[ ПОСЛЕ, ДОБАВИТЬ ]----------------------------------------
  43. #
  44.  
  45. <tr>
  46. <td class="row1"><span class="gen">
  47. Вариант_вопроса *<br />
  48. (Вы должны ПРАВИЛЬНО ответить на вопрос)</span>
  49. </td>
  50. <td class="row2">
  51. <input type=text name=check>
  52. </td>
  53. </tr>
  54.  
  55. #
  56. #-----[ ВСЁ СОХРАНИТЬ/ВСЁ ЗАКРЫТЬ]----------------------------
  57. #

Ваша оценка: Пусто Средняя: 3.2 (59 votes)

Комментарии

Отправить комментарий

 
  • Адреса страниц и электронной почты автоматически преобразуются в ссылки.
  • Строки и параграфы переносятся автоматически.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. Beside the tag style "<foo>" it is also possible to use "[foo]".
  • Image links with 'rel="lightbox"' in the <a> tag will appear in a Lightbox when clicked on.
  • Image links from G2 are formatted for use with Lightbox2
  • Image links with 'rel="lightshow"' in the <a> tag will appear in a Lightbox slideshow when clicked on.
  • Links to HTML content with 'rel="lightframe"' in the <a> tag will appear in a Lightbox when clicked on.
  • Links to video content with 'rel="lightvideo"' in the <a> tag will appear in a Lightbox when clicked on.
  • Links to inline or modal content with 'rel="lightmodal"' in the <a> tag will appear in a Lightbox when clicked on.

Подробнее о форматировании

Главная | Портфолио | Услуги | Контакты | Блог