1. Go to this page and download the library: Download petecoop/protec 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/ */
$summary = Protec::ip('203.0.113.10');
$summary->isBlocked;
$summary->isPermanentlyBlocked;
$summary->blockedUntil; // Latest active expiry; null if permanent or not blocked.
$summary->totalBlocks; // All retained block records for this IP.
$summary->activeBlocks;
$summary->latestBlock; // Most recent IpBlock record, which may have ended.
$summary->toArray(); // Also supports JSON serialization.
'escalation' => [
'after' => 3, // number of times the offending detector can trigger
'within' => '8h', // within this time period
'block_for' => '7d', // null makes the escalated block permanent.
],