这是我的代码:-
<?php
$url = file_get_contents("http://www.youtube.com/watch?v=QR8A3T6sPzU");
$doc = new DOMDocument();
@$doc->loadHTML($url);
$xpath = new DOMXPath($doc);
$myNews = $xpath->query('//@id="watch7-views-info"')->item(0);
echo $myNews;
?>
如何仅在某些跨度 ID 内获取 div 标签之间的所有文本...
谢谢