<?php
include 'phpQuery.php';
$html = file_get_contents('http://demo.phpost.net/posts/arte/57/qsdfgh.html');
phpQuery::newDocumentHTML($html, $charset = 'utf-8');
$result = array();
$result['title'] = pq('div.post-title')->find('h1')->text();
$result['img'] = array();
foreach (pq('div.post-contenido')->find('img') as $img) {
$result['img'][] = pq($img)->attr('src');
}
$result['tags'] = array();
foreach (pq('div.tags-block')->find('a[rel=tag]') as $a) {
$result['tags'][] = pq($a)->text();
}
print_r($result);
Array
(
[title] => qsdfgh
[img] => Array
(
[0] => http://i.i.imgur.com/HRrtdzw.gif
)
[tags] => Array
(
[0] => gol
[1] => hgg
[2] => ghf
[3] => hjj
)
)