PHP code example of flowd / phirewall-preset-bad-ips
1. Go to this page and download the library: Download flowd/phirewall-preset-bad-ips 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/ */
flowd / phirewall-preset-bad-ips example snippets
use Flowd\Phirewall\Config;
use Flowd\PhirewallPresetBadIps\Presets;
$config = (new Config($cache))->with(Presets::blocklist());
use Flowd\Phirewall\Support\CompiledDataCache;
$config->setCompiledDataCache(new CompiledDataCache('/path/to/var/cache/phirewall'));
$config = $config->with(Presets::blocklist());