xakki / phpwall
Protect web
0.1.4
2021-04-17 21:33 UTC
Requires
- php: >=5.6
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- ext-memcached: *
- ext-pdo: *
- psr/log: ^1.0
This package is auto-updated.
Last update: 2025-05-18 13:48:38 UTC
README
Protect site from scanners on PHP
Get googleCaptha keys from https://www.google.com/recaptcha/admin/
Install
composer require xakki/phpwall
Configure
- Create table (dont foget change pass)
CREATE DATABASE `phpwall` CHARACTER SET 'utf8'; CREATE USER 'phpwall'@'%' IDENTIFIED BY 'DB_PASS_CHANGE_ME'; GRANT ALL PRIVILEGES ON phpwall.* TO 'phpwall'@'%'; FLUSH PRIVILEGES;
If encoded password
set password for 'phpwall' = PASSWORD('*****');
-
get googleCaptcha from https://www.google.com/recaptcha/admin/
-
Add code of begin
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, ] ); }
View mode
View URL ?REQUEST_CHANGE_ME=1