- 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() для лохов!
Мистер Хэнки 12.02.2011 20:17 # +2
>$txt=str_replace("\""," ",$txt);
смысл сего от меня ускользает
gegMOPO4 13.02.2011 22:35 # 0
Lure Of Chaos 12.02.2011 20:26 # +1
brainstorm 13.02.2011 02:32 # −2
Uchkuma 14.02.2011 16:21 # +2
мозги страшилам
Lure Of Chaos 14.02.2011 20:03 # 0