我正在使用这个库(
PHP Simple HTML DOM解析器)来解析链接,这里是代码:
function getSemanticRelevantKeywords($keyword){ $results = array(); $html = file_get_html("http://www.semager.de/api/keyword.PHP?q=". urlencode($keyword) ."&lang=de&out=html&count=2&threshold="); foreach($html->find('span') as $e){ $results[] = $e->plaintext; } return $results; }
Fatal error: Call to a member function find() on a non-object in
/var/www/vhosts/efamous.de/subdomains/sandBox/httpdocs/getNewTrusts.PHP
on line 25