There is a php lib called QueryList
(http://git.oschina.net/jae/QueryList), it use phpQuery
internally, and use some css selector filter array to fetch the specific content in certain url.
the doc is in Chinese(I don't think there is a English version), but it's quite simple to use:
<?php
// include the lib
require_once('QueryList.class.php');
// url to fetch content
$url = 'http://www.example.com/index.html';
// filter rules using css selector grammar
$regArr = array(
'time' => array('td:nth-child(2)', 'text'),
'summary' => array('td:nth-child(3) td:nth-child(3)', 'text'),
'imgSrc' => array('h1 > a > img', 'src')
);
// optional, firstly find `.divbox > table`, then find the things defined by $regArr in each `.divbox > table`
$regRange = '.divbox > table';
// do the query
$result = QueryList::Query($url, $regArr, $regRange);
// the result will be an array like:
/** Array
* (
* [0] => Array
* (
* 'time' => ,
* 'summary' => ,
* 'imgSrc' =>
* )
* [1] => Array
* (
* 'time' => ,
* 'summary' => ,
* 'imgSrc' =>
* )
* ...
* )
*/
echo '<pre>';
print_r($result->jsonArr);
echo '</pre>';
you can also define a exclude pattern and a callback function in $regArr, I think this will meet your requirment.