PHP Script Codes > ZB Block
ZB Block is a fast all-around php driven security pre-parser for securing websites against several forms of attack, including robots, hackers, some spambots, bad hosts, signature spam, forum spam, SQL injection(SQLi), Remote File Inclusion(RFI). It includes an installing setup.php that makes setting it up on your website, blog, bulletin board, or CMS site as easy as adding a graphic to a raw html page(task comparison).
The script uses intelligent, extensible signature rules to detect bad behavior. Using flat-file methods, the signatures are stored in an .inc, and logs/IP lists in a csv to prevent being disrupted by SQLi.
If an attack is detected it logs the pertinent data in a .txt and a .csv, displays the forbidden screen, and then sleeps for around 5 (admin changeable) seconds to prevent flooding. The 403 http_forbidden error includes a description of why the client was blocked. If hit 3 (admin changeable) times, a permanent 503 ban is enforced, saving bandwidth and CPU time.