龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > web编程 > php编程 >

php 看糗百简单PHP版

时间:2014-09-16 03:13来源:网络整理 作者:网络 点击:
分享到:
看糗百简单PHP版 [代码片段(9行)]
<?php
require 'phpQuery/phpQuery.php';
phpQuery::newDocumentFile('http://hxyl.net/');
$art = pq('#content .entry');
foreach($art as $k=>$v){
    print '标题:'.pq($v)->find('h2')->html().'<br>';
    print '内容:'.pq($v)->find('p:eq(0)')->html().'<hr>';
}
//该片段来自于http://outofmemory.cn
精彩图集

赞助商链接