<?php
/* EXAMPLE 1 */
$youtube = new Feedee('youtube');
$youtube->setUser('djshina'); // The user name on Youtube
$youtube->setType('uploads'); // We want to get the uploads
foreach ($youtube as $video)
{
echo '<h1><a href="'.$video->link.'">'.$video->title.'</a></h1>';
echo $video->embed;
}
/* OPTIONS */
// USER MODE
$youtube->setUser($username); // Is used to get the user videos.
$youtube->setType($type); // Type can be 'uploads' or 'favorites'.
// ATTRIBUTES
$video->title;
$video->link;
$video->embed; //display the player
$video->width; //used to set the width of the player. Default is 640
$video->height; //user to set the height of the player. Default is 385
// PLAYLIST MODE
$youtube->setPlaylist($playlist); // Get all videos of a playlist code.
// ATTRIBUTES
$video->title;
$video->link;
$video->author;
$video->authorLink;
$video->embed; //display the player
$video->width; //used to set the width of the player. Default is 640
$video->height; //user to set the height of the player. Default is 385
// VIDEO MODE
$youtube->setVideo($videoUrl); // the full url of the video
//ATTRIBUTES
$video->title;
$video->html;
$video->author;
$video->embed; //display the player
$video->width; //used to set the width of the player. Default is 640
$video->height; //user to set the height of the player. Default is 385
$video->thumbWidth;
$video->thumbHeight;
$video->thumb; // Url of the image thumb.
|