Skip to content

Instantly share code, notes, and snippets.

@bastianallgeier
Created June 17, 2013 21:31
Show Gist options
  • Save bastianallgeier/5800651 to your computer and use it in GitHub Desktop.
Save bastianallgeier/5800651 to your computer and use it in GitHub Desktop.
<?php
$src = 'http://player.vimeo.com/video/1234';
preg_match('!video\/([0-9]+)!i', $src, $match);
$id = $match[1];
$apiurl = 'http://vimeo.com/api/v2/video/' . $id . '.json';
$response = file_get_contents($apiurl);
$json = json_decode($response, true);
print_r($json[0]['thumbnail_large']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment