How to Download Vimeo Thumbnail With PHP





 Demo-Vimeo thumbnail downloader Tool

<center>
<fieldset>
        <h1>Vimeo Thumbnail Downloader Tool</h1>
<form action="" method="POST">

Example-https://vimeo.com/389063954<br>
<input type="text" name="love" placeholder="https://vimeo.com/389063954"/><br>


<input type="submit" name="submit" value="Download Vimeo Thumbnail">


    </form>
    <fieldset>


<?php


if(isset($_POST['submit'])){
function getVimeoId($url)
{
    if (preg_match('#(?:https?://)?(?:www.)?(?:player.)?vimeo.com/(?:[a-z]*/)*([0-9]{6,11})[?]?.*#', $url, $m)) {
        return $m[1];
    }
    return false;
}

function getVimeoThumb($id)
{
    $arr_vimeo = unserialize(file_get_contents("http://vimeo.com/api/v2/video/$id.php"));
  
   // return $arr_vimeo[0]['thumbnail_small']; // returns small thumbnail
   //  return $arr_vimeo[0]['thumbnail_medium']; // returns medium thumbnail
    return $arr_vimeo[0]['thumbnail_large']; // returns large thumbnail
}

$video_url = $_POST['love'];
$video_id = getVimeoId($video_url);
$thumbnail = getVimeoThumb($video_id);


echo "<img src='$thumbnail' />";









?>
<h1>Right Click on Image and click on save image</h1>
<?php  } ?>


<center>


Next
This is the current newest page
Previous
Next Post »
Thanks for your comment