Vimeo thumbnail from video id

posast picture posast · Aug 19, 2014 · Viewed 8k times · Source

I know that there are multiple themes about this already open, but I tried them all and nothing works for me. I would like to get Vimeo thumbnail from Vimeo video id using PHP.

Answer

Nilesh Khalas picture Nilesh Khalas · Aug 19, 2014
<?php
function getVimeoThumb($id)
{
$vimeo = unserialize(file_get_contents("http://vimeo.com/api/v2/video/$id.php"));
echo $small = $vimeo[0]['thumbnail_small'];
echo $medium = $vimeo[0]['thumbnail_medium'];
echo $large = $vimeo[0]['thumbnail_large'];
}

echo getVimeoThumb(102514372);
?>

Try above code.