3

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 thumbnail, and then it stores the image in a directory, and the url in the database.

Can anyone help me out on this?

4

2 回答 2

12

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'];
于 2012-09-12T20:32:30.540 回答
2

您可以使用它以一种简单的方式检索图像:

https://vimeo.com/api/oembed.json?url=$videoUrl
于 2017-09-27T03:42:14.350 回答