网站使用技巧>正文
齐博(php168)采集规则过滤超链接
2014-08-25 14:37$search = array ("’<script[^>]*?>.*?</script>’si",//过滤SCRIPT标记
"’<iframe[^>]*?>.*?</iframe>’si", //过滤IFRAME标记
"’<style[^>]*?>.*?</style>’si",//过滤STYLE标记
"’<[/!]*span[^<>]*?>’si",//过滤SPAN标记
"’<[/!]*font[^<>]*?>’si",//过滤font标记
"’<[/!]*strong[^<>]*?>’si",//过滤STRONG标记
"’<[/!]*table[^<>]*?>’si",//过滤table标记
"’<[/!]*tr[^<>]*?>’si",//过滤tr标记
"’<[/!]*td[^<>]*?>’si",//过滤tbody标记
"’<[/!]*tbody[^<>]*?>’si",//过滤tbody标记
"’<[/!]*input[^<>]*?>’si",//过滤INPUT标记
"’<[/!]*a[^<>]*?>’si",//过滤A标记,如果要过滤链接中的字,必须在过滤规则中写下。
"’<div class="pagelist">.*?</div>’si", //过滤pagelist的DIV中所有内容
"’<[/!]*div[^<>]*?>’si",//过滤DIV标记
"’&#(d+);’e");
$replace = array ("",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"chr(1)");
$show_content=preg_replace($search,$replace,$show_content);
$htmlcode=preg_replace($search,$replace,$htmlcode);
"’<iframe[^>]*?>.*?</iframe>’si", //过滤IFRAME标记
"’<style[^>]*?>.*?</style>’si",//过滤STYLE标记
"’<[/!]*span[^<>]*?>’si",//过滤SPAN标记
"’<[/!]*font[^<>]*?>’si",//过滤font标记
"’<[/!]*strong[^<>]*?>’si",//过滤STRONG标记
"’<[/!]*table[^<>]*?>’si",//过滤table标记
"’<[/!]*tr[^<>]*?>’si",//过滤tr标记
"’<[/!]*td[^<>]*?>’si",//过滤tbody标记
"’<[/!]*tbody[^<>]*?>’si",//过滤tbody标记
"’<[/!]*input[^<>]*?>’si",//过滤INPUT标记
"’<[/!]*a[^<>]*?>’si",//过滤A标记,如果要过滤链接中的字,必须在过滤规则中写下。
"’<div class="pagelist">.*?</div>’si", //过滤pagelist的DIV中所有内容
"’<[/!]*div[^<>]*?>’si",//过滤DIV标记
"’&#(d+);’e");
$replace = array ("",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"chr(1)");
$show_content=preg_replace($search,$replace,$show_content);
$htmlcode=preg_replace($search,$replace,$htmlcode);
本文链接:https://www.0937.biz/post-177.html
猜你喜欢
- 2014-08-25 HTML内嵌网页
- 2014-08-25 帝国cms sitemap.php 转sitemap.xml 伪静态规则
- 2014-08-25 织梦火车头发布模块参数设置和详细介绍
- 2014-08-25 论坛注册页面提示语的修改方法
- 2014-08-25 齐博cms(原PHP168)打了3月4日的补丁后.百度编辑器上传不了图片了
- 2014-08-25 phpcms v9网站搬家更换域名的详细方法
- 2014-08-25 css控制div显示/隐藏方法及2种方法比较原码 转
- 2014-08-25 dedecms采集过滤规则 万能采集过滤代码 常用过滤
- 2014-08-25 html网页跳转代码大全
- 图文推荐
-
- 热门标签