/ Published in: PHP
This is a very simple use of the Vimeo API. All it does is list the video title, a thumbnail of the video, and the description. More advance script coming later.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php // make sure to replace vimeouser with your vimeo username $vimeorequest = 'http://vimeo.com/api/v2/vimeouser/videos.json'; // parameter 'true' is necessary for output as PHP array // the number of videos we want to display $videosToShow = 5; for($i=0;$i<=$videosToShow;$i++){ echo "<p><a href=\"" . $video[$i]['url'] . "\">" . $video[$i]['title'] . "</a></p>"; echo "<p><a href=\"" . $video[$i]['url'] . "\"><img src=\"" . $video[$i]['thumbnail_medium'] . "\" alt=\"" . $video[$i]['title'] . "\" /></a></p>"; echo "<p>" . $video[$i]['description'] . "</p>"; echo "<hr />\n"; } ?>