queryList实现分页参数接受的采集

$pn = $_GET['pn'];
<?php
    require 'QueryList.class.php';
    header('Content-type:text/html;charset=utf-8');
    // 博客园支持分页,通过chrome找到此分页方法
    $url = 'http://www.cnblogs.com/sitehome/p/';
    $pn = $_GET['pn'];
    $url = $url.$pn;
    $reg = array('img_url'=>array('img','src'),
                'title'=>array('.titlelnk','text'),
                'content'=>array('.post_item_summary','text'),
                'content_url'=>array('.titlelnk','href'));

    $rang = '.post_item'; $hj = QueryList::Query($url,$reg,$rang,'curl'); echo $hj->getJSON(); ?>

猜你喜欢

转载自www.cnblogs.com/stillstep/p/11105743.html