Hi all.. Please anyone help me to get vimeo thumbnail to show in my blog post? I'm looking for a php function where it ll take vimeo video id as parameter and ll return its thumbnail Thanks in advance.
Google found this: function getVimeoThumb($videoid,$size) { $url = "vimeo.com/api/clip/".$videoid."/php/"; $ch = curl_init($url); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); // grab URL and pass it to the browser $data = curl_exec($ch); curl_close($ch); $finaldata = unserialize($data); return ''; } PHP: or $video_url = "http://vimeo.com/7811853" $file = fopen($video_url, "r"); $filedata = stream_get_contents($file); $html_content = strpos($filedata,"<link rel=\"videothumbnail"); $link_string = substr($filedata, $html_content, 128); $video_id_array = explode("\"", $link_string); $thumbnail_url = $video_id_array[3]; echo $thumbnail_url; PHP: or $imgid = 6271487; $hash = unserialize(file_get_contents("http://vimeo.com/api/v2/video/$imgid.php")); echo $hash[0]['thumbnail_medium']; PHP: