PHP code example of mulertech / scanner-ban-bundle
1. Go to this page and download the library: Download mulertech/scanner-ban-bundle 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/ */
mulertech / scanner-ban-bundle example snippets
// config/bundles.php
return [
// ...
MulerTech\ScannerBan\MulerTechScannerBanBundle::class => ['prod' => true],
];
// src/Notifier/ScannerBanNotifier.php
final readonly class ScannerBanNotifier implements ScannerBanNotifierInterface
{
public function __construct(private NotificationService $notificationService)
{
}
public function notify(string $message): void
{
$this->notificationService->send($message);
}
}
bash
php bin/console scanner-ban:digest
bash
php bin/console scanner-ban:unban 203.0.113.42