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
精彩评论