在 google、php 文档和 ofc 堆栈溢出周围搜索,找不到可以使用的东西,我需要一些代码帮助我需要if为我的函数编写一个语句,file_get_html这显然被称为 usingSimple HTML DOM Parser 
我需要它返回一个简单的回声,就像Hello World它只显示为一样,http://sweetvideos.net但它会$element->content像我当前的脚本一样输出,因为我og:image自己尝试了几个小时并继续返回这个..
file_get_contents(http://sweetvideos.net): failed to open stream: HTTP request failed! HTTP/1.1 404 NOT FOUND
谁能帮我?
我的代码:
include('include/simple_html_dom.php');
$url = "?video=12c11210";
$html = file_get_html('http://sweetvideos.net' . $url);
if ($html->find('meta[property=og:image]')) {
  foreach ($html->find('meta[property=og:image]') as $element) {
    $img[] = $element->attr['content'];
    }
}