使用simple_dom_html获取标题页时出错?

时间:2012-12-25 09:47:59

标签: php

我有一个示例代码:

include('simple_html_dom.php');
$url = 'http://api.nrelate.com/mpw_wp/0.51.4/?tag=nrelate_popular&domain=dongcam.vn&url=http%3A%2F%2Fdongcam.vn%2Ft10041&maxageposts=4320&nr_div_number=2&increment=1';
$html = file_get_html($url);
// find all span tags with class=nr_post_title
foreach($html->find('span.nr_post_title') as $e)
    echo $e->innertext . '<br>';

=&GT;错误无法通过<span class=\"nr_post_title\">获取标题,如何解决?

0 个答案:

没有答案