- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
<?php
function anti_hacker($txt){
$txt=str_replace("|","I",$txt);
$txt=str_replace("../",",,/",$txt);
$txt=str_replace("||","I",$txt);
$txt=str_replace("\"","",$txt);
$txt=str_replace("\""," ",$txt);
$txt=str_replace("/\\\$/","",$txt);
$txt=str_replace("$","",$txt);
$txt=str_replace("\\","",$txt);
$txt=str_replace("\\","",$txt);
$txt=str_replace("@","",$txt);
$txt=str_replace("`","",$txt);
$txt=str_replace("^","",$txt);
$txt=str_replace("%","",$txt);
$txt=htmlspecialchars($txt);
$txt=stripslashes(trim($txt));
return $txt;}
if(isset($_GET)){foreach($_GET as $key=>$value){$_GET[$key]=anti_hacker($value);}}
if(isset($_POST)){foreach($_POST as $key=>$value){$_POST[$key]=anti_hacker($value);}}
if(isset($_SESSION)){foreach($_SESSION as $key=>$value){$_SESSION[$key]=anti_hacker($value);}}
if(isset($_COOKIE)){foreach($_COOKIE as $key=>$value){$_COOKIE[$key]=anti_hacker($value);}}
Еще одну, не могу удержаться))) Тормоза - для трусов, array_map() для лохов!