SandTrap is a project mainly written in PHP, based on the MIT license.
Identify malicious website spidering bots and block them from accessing PHP pages.
This project is for a PHP script that will add any IP address that accesses it to a blacklist file. This blacklist file can then be accessed by any other script on the server to determine which IPs should be delivered false content.
Intended requirements for using this script:
Installation:
Copy the sandtrap directory and banip.php to the root directory for your domain
If you already have a robots.txt file the root directory for your domain, modify it to include the rules in the inccluded robots.txt file. Otherwise copy the included robots.txt file to the root directory for your domain.
Add the following code to the top of all PHP files that you want to be blocked (modify this code to point to the correct path for sandtrap.php): require_once("sandtrap/sandtrap.php");
To increase the likelihood of malicious robots finding the banip.php file and accessing it, add the following HTML snippet near the top of your PHP pages: Click to ban your IP