Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function filter($str) {
- $str = preg_replace('/<\w+.*?>/', '', $str);
- $str = str_replace('\'', '', $str);
- $str = str_replace('"', '', $str);
- $str = str_replace('`', '', $str);
- $str = str_replace('&', '', $str);
- $str = str_replace(';', '', $str);
- $str = str_replace('%', '', $str);
- $str = str_replace('$', '', $str);
- if (strpos(strtolower($str), 'script') !== false) {
- die("Hackerz!!!");
- }
- if (strpos(strtolower($str), 'img') != false) {
- die("Hackerz!!!");
- }
- if (strpos(strtolower($str), 'img') != false) {
- die("Hackerz!!!");
- }
- if (strpos(strtolower($str), 'onload') != false) {
- die("Hackerz!!!");
- }
- if (strpos(strtolower($str), 'onerror') != false) {
- die("Hackerz!!!");
- }
- return $str;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement