PHP code example of zima / laravel-antibot

1. Go to this page and download the library: Download zima/laravel-antibot library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

zima / laravel-antibot example snippets


    // List of antibot fields which will be added to form
    'fields' => [
        'telephone' => Antibot::TYPE_FIELD_INPUT,
        'verify' => Antibot::TYPE_FIELD_CHECKBOX,
    ],

    // Whether to allow links in form fields
    'allow_links' => false,

    // List of words for detecting bot
    'stop_list' => [
        'погиб', 'плен', 'украин', 'акци', 'скидк', 'всу', 'вооружен',
        'вооруж', 'силы', 'сил', 'солдат', 'биткоин', 'помощь', 'помощ', 'боев',
        'деньг', 'денег', 'free', 'sale', 'porn',
    ],

    'feedback' => [
        '['description'],    // fields in which spam is searched (ignored if empty or not specified)
        'allow_links' => true,                  // use it if you need to overwrite global 'allow_links
    ],

Route::match(['get', 'post'], '/test', [TestController::class, 'index'])
    ->name('test')
    ->middleware('antibot:feedback');

# or without preset for base level of antibot detecting only

Route::match(['get', 'post'], '/test', [TestController::class, 'index'])
    ->name('test')
    ->middleware('antibot');


php composer.phar 

php artisan vendor:publish --tag=antibot-config