Skip to content

Instantly share code, notes, and snippets.

@Ph3nol
Created February 16, 2012 16:05
Show Gist options
  • Save Ph3nol/1846066 to your computer and use it in GitHub Desktop.
Save Ph3nol/1846066 to your computer and use it in GitHub Desktop.
Vimeo video informations extraction from API
<?php
function extractVimeoInformations($videoID, $fieldToExtract = 'id')
{
$apiExtraction = unserialize(file_get_contents(sprintf('http://vimeo.com/api/v2/video/%s.php', $videoID)));
return $apiExtraction[0];
}
?>
<?php $v = extractVimeoInformations(20978014) ?>
<h2>Example for <?php echo $v['title'] ?></h2>
<p>
<img src="<?php echo $v['thumbnail_medium'] ?>" alt="<?php echo $v['title'] ?>" />
</p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment