php使用xpath抽取网页超链接 loadHTML($html); $xpath=new DOMXpath($doc); foreach($xpath->query('//a/@href') as $node){ $link = $node->nodeValue; echo $link . "\n"; } ?> 로그인 후 복사