我查看了很多信息,但暂时没有找到工作版本。
我从这篇文章中获取了代码: 如何从该视频的视频 ID 中获取 Dailymotion 视频中的视频缩略图,就像在 youtube 中一样?
$id='xwxadz'; // ID DAILYMOTION EXAMPLE
$thumbnail_medium_url='https://api.dailymotion.com/video/'.$id.'?fields=thumbnail_medium_url';
$json_thumbnail = file_get_contents($thumbnail_medium_url);
$get_thumbnail = json_decode($json_thumbnail, TRUE);
$thumb=$get_thumbnail['thumbnail_medium_url'];
echo $thumb; // Output Example : http://s2.dmcdn.net/BJL4o/160x120-mzR.jpg
输出:
Warning: file_get_contents() [function.file-get-contents]: Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in Z:\home\static.loc\www\new.php on line 4
Warning: file_get_contents(https://api.dailymotion.com/video/xwxadz?fields=thumbnail_medium_url) [function.file-get-contents]: failed to open stream: No error in Z:\home\static.loc\www\new.php on line 4