标签:
1、strip_tags(string,allow)
2、
转编码
$getcontent = iconv(‘gb2312‘,‘utf-8‘,file_get_contents($url));
$getcontent = preg_replace( "@<head>(.*?)</head>@is", "", $getcontent );
$getcontent = preg_replace( "@<script(.*?)</script>@is", "", $getcontent );
$getcontent = preg_replace( "@<iframe(.*?)</iframe>@is", "", $getcontent );
$getcontent = preg_replace( "@<style(.*?)</style>@is", "", $getcontent );
$getcontent = preg_replace( "@<(.*?)>@is", "", $getcontent );
标签:
原文地址:http://www.cnblogs.com/lvzhihui/p/4821763.html