PHP抓取页面生成HTMl文件简单代码

PHP抓取页面生成HTMl文件简单代码

<?php      ob_start();//开启缓存     // $content=  ob_get_contents();//从缓存中获取内容      $content=file_get_contents('http://localhost/weizhuan/detail.php?aid=349&uid=1534');      ob_end_clean();//关闭缓存并清空      /***缓存结束***/      file_put_contents("ceshi2.html", $content);      echo $content;       echo "ok";  ?>