Created
February 16, 2012 16:05
-
-
Save Ph3nol/1846066 to your computer and use it in GitHub Desktop.
Vimeo video informations extraction from API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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