$classname = "pr";
$page = file_get_contents($url);
@$doc = new DOMDocument();
@$doc->loadHTML($page);
$xpath = new DomXPath($doc);
$nodeList = $xpath->query("//*[contains(concat(' ', normalize-space(@class), ' '), ' $classname ')]");
for ($i = $nodeList->length - 1; $i > -1; $i--) {
$result[] = $nodeList->item($i)->nodeValue;
}
正在接收数据...但是没有图像...我也希望图像src! 有人知道吗? 谢谢!