PHP code example of oyeaussie / phpfirewall
1. Go to this page and download the library: Download oyeaussie/phpfirewall 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/ */
oyeaussie / phpfirewall example snippets
//In index.php
assume that firewall configuration and/or IP2location API keys are set!
if (!(new \PHPFirewall\Firewall)->checkIp()) {
//Send 404
http_response_code(404);
exit;
}
// Rest of your code