-
-
$str=preg_replace("/s+/", " ", $str); //余分なキャリッジをフィルタリング$str=preg_replace("//si","", $ str); //コメント $str=preg_replace("//si","",$str); //フィルタ DOCTYPE $str=preg_replace("//si","",$str); //html タグをフィルター$str=preg_replace("//si","", $ str); //br タグをフィルタリング $str=preg_replace("//si","",$str); //head タグをフィルタリングする $str=preg_replace ("/ /si","",$str); //メタタグをフィルタリング $str=preg_replace("/ /si" ,"",$str); //ボディタグをフィルタリング $str=preg_replace("//si","",$str); //フィルタリングリンクタグ $str =preg_replace("//si","",$str); // フォームタグをフィルタリングします$str=preg_replace("/cookie/si", "COOKIE",$ str); // COOKIE タグをフィルタリング $str=preg_replace("/(.*?)/si", "",$str ); // アプレット タグのフィルタ $str=preg_replace("//si","",$str); // アプレット タグのフィルタpreg_replace("/< ;(style.*?)>(.*?)/si","",$str); // スタイルタグをフィルタリングします $str=preg_replace ("//si","",$str); //スタイルタグをフィルター $str=preg_replace("/(. *?)/si","",$str); //タイトルタグをフィルタリング $str=preg_replace("// si","" ,$str); //タイトルタグをフィルタリング $str=preg_replace("/(.*?)/si ","", $str); // オブジェクト タグをフィルタリング $str=preg_replace("//si","",$str); // オブジェクト タグをフィルタリング$ str=preg_replace(" /(.*?)/si","",$str); // noframes タグをフィルターします $str); =preg_replace("/ /si","",$str); //noframes タグをフィルタリング $str=preg_replace("/(.* ?)/si","",$str); //フレームタグをフィルタリング $str=preg_replace("//si","",$str); //フィルターフレームタグ$str=preg_replace("/(.*?)/si","",$ str); // スクリプト タグのフィルタ $str=preg_replace("/javascript/si","Javascript",$str); // スクリプト タグのフィルタ $str=preg_replace("/vbscript/si","Vbscript",$) str); // スクリプト タグのフィルタ $str=preg_replace("/on([a-z]+)s*=/si","On\1=",$str); "//si ","",$str); //フィルタースクリプトタグ
コードをコピー
特殊文字をフィルターするためのphpの実用的な関数
PHPフォーム送信時の特殊文字フィルタリング方法
html特殊文字フィルターPHPクラス
URLリンク内の特殊文字をエスケープする方法
PHPの特殊文字エスケープの詳しい説明
phpフィルターパラメータの特殊文字のアンチインジェクション
不正な特殊な文字列をフィルタリングするためのphpメソッド
PHPの特殊文字処理関数の例
|