这个php函数就获网页代码html,转换成一行的字符串

分类:php

 

<?php 
$test=file_get_contents('http://app8888888.qzone.qzoneapp.com/goodriji.html');
$test=str_replace('<br>','<br />',$test);
$test= str_replace("\t","",$test); 
$test= str_replace("\r\n","",$test); 
$test= str_replace("\r","",$test); 
$test= str_replace("\n","",$test); 
$day=date("Y-m-d");
?>

<script type="text/javascript" charset="utf-8"  src="http://fusion.qq.com/fusion_loader?appid=8888888&platform=qzone"></script>
<script type="text/javascript">
function save(){
            fusion2.dialog.saveBlog({
            title : '<?=$day?>',
            content : '<?php echo $test?>', 
            context : "saveblog",
});

}
</script>

这个函数就获网页代码html,转换成一行的字符串.

本文链接: 这个php函数就获网页代码html,转换成一行的字符串
版权所有:布士收藏夹在网络收集,如有侵犯你的权利, 请联系QQ:641868752。

评论

发表评论

*

* (显示gravatar头像)

Ctrl+Enter快捷回复

© 2014 布士收藏夹 all rights reserved.