我在项目中遇到了一个刮擦任务.
我想从$ html中的链接中获取数据,tr和td的所有表内容,这里我试图抓住链接但它只显示javascript:self.close()
<?php
include("simple_html_dom.php");
$html = file_get_html('http://www.areacodelocations.info/allcities.php?ac=201');
foreach($html->find('a') as $element)
echo $element->href . '<br>';
?>
Run Code Online (Sandbox Code Playgroud)