<?php
include "youtube.class.php";
$jutjub = new YouTube('http://www.youtube.com/watch?v=M_bvT-DGcWw');
//Show image of this video. This function accepts three parameters, but none is required.
// 1st: Video url or video ID displayed on youtube (http://www.youtube.com/watch?v=VIDEO_ID) - if omitted (null), one used in constructor will be used
// 2nd: Image ID (1, 2 or 3) - default: 1
// 3rd: Image ALT/TITLE text - default: Video screenshot
echo $jutjub->ShowImg() . ' ' . $jutjub->ShowImg('http://www.youtube.com/watch?v=M_bvT-DGcWw', 2) . ' ' . $jutjub->ShowImg('M_bvT-DGcWw', 3, 'Custom title');
//new line : )
echo "<br /><br />\n";
//Embed video on web page. This function accepts three parameters, but none is required.
// 1st: Video id or video url displayed on youtube (http://www.youtube.com/watch?v=VIDEO_ID) - if omitted (null), one used in constructor will be used
// 2nd: Video width in pixels - default: 425
// 3rd: Video height in pixels - default: 344
echo $jutjub->EmbedVideo();
//new line : )
echo "<br /><br />\n";
//Extract video ID
echo "Video ID: " . YouTube::parseURL('http://www.youtube.com/watch?v=M_bvT-DGcWw&mode=user&search=');
?>
|