The other day it took for one project, on the Kohana framework, to fasten the protection of the forms against spam bots.
There were no ready-made modules, but I didn’t want to bother users with captcha.
Therefore, it was decided to search for Habré ready-made libraries or methods to combat spam.
And the Botobor library (
habrahabr.ru/post/135209 ), written by the user
Mekras , was
found .
Before that, I never had to write modules for Kohana, so this was an opportunity to slightly increase my knowledge.
')
This is the result of
github.com/evgentus/antispamInstallation
Installing this module is no different from installing any other module.
We copy all the files into modules / antispam /, configure the config, add the module to application / bootstrap.php
Config
In the config, all parameters are documented in detail.
Some demo code
In order to "prepare" a form for the bot, you need to do this:
<?php $form = getForm();
In order to check the form, you need to do this:
<?php if (Antispam::factory()->isHuman()){
Finally
The Botobor library has been slightly rewritten for ease of configuration.
If anyone has any ideas or links to methods of detecting and combating spam, leave comments, I will try to add them to this module.
This module is designed to screen out "simple" spam bots, but it will not save you from those who intentionally want to spam your resource.
All the details in the topic Botobor'a (
habrahabr.ru/post/135209 )