【发布时间】:2016-09-05 20:50:15
【问题描述】:
我想从 YMCA 本地计划中提取数据,数据表位于 div="scheduler_here" 下。对于这个项目,我使用PHP Simple HTML DOM Parser。但它没有显示任何数据。
<?php
// Include the library
include('simple_html_dom.php');
// Retrieve the DOM from a given URL
$html = file_get_html('http://www.activelifeadmin.com/newyork/websearch/public/index/weekview?sched=Group%20Exercise%20Schedule,Large%20Pool,Small%20Pool&branch_ids=38#/');
// Find the DIV tag with an id of "myId"
foreach($html->find('div[scheduler_here]') as $e)
echo $e->innertext . '<br>';
?>
【问题讨论】:
标签: php dom html-parsing