我无法从一些网站获取元描述标签,其中一个特别是youtube。
我尝试过使用“get_meta_tags”,但是它没有返回描述。我也尝试过使用几个正则表达式。标题返回良好。
请尝试从以下链接获取描述:http://www.youtube.com/watch?v=xci0-2600万bk
$url = http://www.youtube.com/watch?v=xci0-26M-bk ;
if ($fp = @fopen($url, r )) {
$file = file($url);
$file = implode("", $file);
$tags = get_meta_tags($url);
$description = trim($tags[ description ]);
}
$description返回空白。。。