cleantalk / firewall
CleanTalk APBCT `SFW` classes
1.15.14
2026-01-16 09:37 UTC
Requires
Requires (Dev)
- phpcompatibility/php-compatibility: ^9.3
- phpunit/phpunit: ^7.5
- squizlabs/php_codesniffer: 3.*
- vimeo/psalm: ^4.8
This package is auto-updated.
Last update: 2026-02-26 05:30:01 UTC
README
composer require cleantalk/firewall
Using:
Running checking FireWall
<?php namespace Cleantalk\Common\Firewall; $api_key = 'API_KEY_HERE'; $fw_logs_table_name = 'TBL_FIREWALL_LOG'; $fw_data_table_name = 'TBL_FIREWALL_DATA'; try { $firewall = new Firewall($api_key, $fw_logs_table_name); $firewall->loadFwModule( new SFW($fw_logs_table_name, $fw_data_table_name) ); $firewall->run(); } catch (\Exception $e) { error_log('CleanTalk Firewall is not loaded: ' . $e->getMessage()); }
Running updating FireWall
<?php namespace Cleantalk\Common\Firewall; $api_key = 'API_KEY_HERE'; $fw_logs_table_name = 'TBL_FIREWALL_LOG'; $firewall = new Firewall($api_key, $fw_logs_table_name); $fw_updater = $firewall->getUpdater(); if ( defined('APBCT_SFW_DIRECT_UPDATE') && APBCT_SFW_DIRECT_UPDATE ) { return $fw_updater->directUpdate(); } return $fw_updater->update();
Running sending FireWall logs
<?php namespace Cleantalk\Common\Firewall; $api_key = 'API_KEY_HERE'; $fw_logs_table_name = 'TBL_FIREWALL_LOG'; $firewall = new Firewall($api_key, $fw_logs_table_name); return $firewall->sendLogs();