PHP code example of devitools / arceau

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

    

devitools / arceau example snippets




use Devitools\Arceau\Security\Firewall;

use const Devitools\Arceau\Security\Helper\FIREWALL_ALLOW;
use const Devitools\Arceau\Security\Helper\FIREWALL_DENY;

/**
 */
return static function () {
    $allowed = [
        'query:code=10&t=*',
        '172.30.0.1',
        '192.168.*',
    ];

    Firewall::instance()
        ->setDefaultMode(FIREWALL_DENY)
        ->addItem('10.0.0.*', FIREWALL_ALLOW)
        ->addItems($allowed, FIREWALL_ALLOW)
        ->handle();
};

$firewall =