In the event a hacker manages to break out of a function and attempts to begin executing "program execution functions", this script will stop him dead in his tracks!
<?php
$illegal_uri = array("insert", "delete", "where", "update", "base64_encode", "base64_decode", "escapeshellarg", "exec", "passthru", "proc_closes", "proc_get_status", "proc_nice", "proc_open", "proc_terminate", "shell_exec", "system");
$browser_uri = strtolower($_SERVER['REQUEST_URI']);
$total_illegal_uri = count($illegal_uri);
for($i = 0; $i <= $total_illegal_uri; $i++){
if(strpos($browser_uri, $illegal_uri[$i]) !== FALSE)
die("HACKING ATTEMPT!");
}
?>
This also covers most sql injection methods too!