https://github.com/treyhunner/sandtrap
Identify malicious website spidering bots and block them from accessing PHP pages.
https://github.com/treyhunner/sandtrap
Last synced: 2 months ago
JSON representation
Identify malicious website spidering bots and block them from accessing PHP pages.
- Host: GitHub
- URL: https://github.com/treyhunner/sandtrap
- Owner: treyhunner
- License: mit
- Created: 2010-10-16T02:48:00.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2010-10-20T02:03:09.000Z (over 14 years ago)
- Last Synced: 2025-04-04T20:13:38.621Z (2 months ago)
- Language: PHP
- Homepage:
- Size: 93.8 KB
- Stars: 2
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.txt
- License: LICENSE.txt
Awesome Lists containing this project
README
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:
- access to execute PHP
- access to read and write files from within PHP
- robots.txt file accessInstallation:
1. Copy the sandtrap directory and banip.php to the root directory for your
domain2. 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.4. 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");5. 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