使用Snoopy类抓取网页

原创
2016/09/05 07:42
阅读数 1.2K

<?php
    header("content-type:text/html;charset=utf-8");
    include "class/Snoopy.class.php";
    set_time_limit(0);
    $url = "http://sports.sohu.com/nba.shtml";
    $snoopy = new Snoopy;
    
    $snoopy->fetch($url);
    $temp = mb_convert_encoding($snoopy->results, 'utf-8','gbk');

展开阅读全文
加载中

作者的其它热门文章

打赏
0
0 收藏
分享
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部