Dan Farr
Dan Farr

Reputation: 31

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

Can anyone help me out on this?

Upvotes: 3

Views: 6494

Answers (2)

Luciano
Luciano

Reputation: 41

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

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

Upvotes: 3

leticia
leticia

Reputation: 2388

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'];

Upvotes: 12

Related Questions