Location: PHPKode > scripts > YouTube > youtube/example.php
<?php

include "youtube.class.php";

$jutjub = new YouTube();

//Show image of this video. This function accepts three parameters, but only first is required.
// 1st: Video id or video url displayed on youtube (http://www.youtube.com/watch?v=VIDEO_ID)
// 2nd: Image ID (1, 2 or 3) - default: 1
// 3rd: Image ALT/TITLE text - default: Video screenshot
echo $jutjub->ShowImg('aJl5L4mETIs') . ' ' . $jutjub->ShowImg('http://www.youtube.com/watch?v=aJl5L4mETIs',2) . ' ' . $jutjub->ShowImg('aJl5L4mETIs',3,'Custom title');

//new line : )
echo "<br /><br />\n";

//Embed video on web page. This function accepts three parameters, but only first is required.
// 1st: Video id or video url displayed on youtube (http://www.youtube.com/watch?v=VIDEO_ID)
// 2nd: Video width in pixels - default: 425
// 3rd: Video height in pixels - default: 350
echo $jutjub->EmbedVideo('http://www.youtube.com/watch?v=aJl5L4mETIs&mode=user&search=');

?>
Return current item: YouTube