Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /* _____ _____ _ _____ _____ _____ _____ _____ _____
- ___| | __ |_| _ |_ _|___ ___|_ _| __| _ | |
- |_ -| --| -| | __| | | |- _|___| | | | __| | | | |
- |___|_____|__|__|_|__| |_| |___| |_| |_____|__|__|_|_|_|
- |s C R i P T z - T E A M . i N F O|----------------------------
- [PHP] Protect site against bad/hack URL requests
- */
- define("REQUEST_LENGHT", "255");
- if (strlen($_SERVER['REQUEST_URI']) > REQUEST_LENGHT || stripos($_SERVER['REQUEST_URI'], "eval(") ||
- //stripos($_SERVER['REQUEST_URI'], "_just_some_hack_") ||
- stripos($_SERVER['REQUEST_URI'], "../")) {
- @header("HTTP/1.1 414 Request-URI Too Long");
- @header("Status: 414 Request-URI Too Long");
- @header("Connection: Close");
- @exit;
- }
- ?>
Add Comment
Please, Sign In to add comment