开发者

How do I get the tumbnail from a Vimeo video?

I need to be able to get tumbnails from vimeo videos, but I only seem to be finding help for people who have a specfic video. I want to be able to create a PHP form, that gets the url of the video, provides a t开发者_开发知识库humbnail, and then it stores the image in a directory, and the url in the database.

Can anyone help me out on this?


Just for archive purpose and people like me ;) googling for an answer:

// example $link: http://vimeo.com/40556736

$link = str_replace('http://vimeo.com/', 'http://vimeo.com/api/v2/video/', $link) . '.php';

$html_returned = unserialize(file_get_contents($link));

$thumb_url = $html_returned[0]['thumbnail_medium'];


You can use this to retrieve the image in a easy way:

https://vimeo.com/api/oembed.json?url=$videoUrl
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜