PHP code example of xakki / phpwall

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

    

xakki / phpwall example snippets



if (!isset($_SERVER['argv'])) {
   new \Xakki\PHPWall\PHPWall(
       secretRequest: 'REQUEST_CHANGE_ME',
       googleCaptchaSiteKey: 'CHANGE_ME',
       googleCaptchaSecretKey: 'CHANGE_ME',
       debug: true,
       checkUrlKeywordExclude: ['/admin/index.php', '/user/admin'],
       dbPdo: [
           'host' => getenv('MYSQL_HOST'),
           'password' => 'DB_PASS_CHANGE_ME',
           'options' => [
               PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
               PDO::ATTR_PERSISTENT => true,
           ]
       ],
       redisCacheServer: [
           'host' => getenv('REDIS_HOST'),
           'database' => 1,
       ]
   );
}