$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(); ?>