PHP code example of turbo124 / waf

1. Go to this page and download the library: Download turbo124/waf 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/ */

    

turbo124 / waf example snippets


$waf = new \Turbo124\Waf\Waf($api_key, $email, $zone, $account_id);

$waf->unbanIp('103.15.248.112');

$waf->unbanIp('103.15.248.112');

$waf->banAsn('10343');

$waf->unbanAsn('10343');

$waf->banCountry('DE');

$waf->unbanCountry('DE');

$waf->challengeIp('103.15.248.112');

$waf->unchallengeIp('103.15.248.112');

$waf->meta->getDomainInfo('example.com');

[
  "domain" => "puabook.com",
  "ip" => "51.254.35.55",
  "risk_type_string" => "Parked & For Sale Domains,Security Risks",
  "risk_type" => [
    [
      "id" => 128,
      "super_category_id" => 32,
      "name" => "Parked & For Sale Domains",
    ],
    [
      "id" => 32,
      "name" => "Security Risks",
    ],
  ],
  "content_catgories" => [],
  "content_category_string" => "",
]

$waf->meta->getIpInfo('210.140.43.55');

[
  "ip" => "210.140.43.55",
  "asn" => 4694,
  "country" => "JP",
  "risk_types" => [],
]