Youtube - Retrieving feed from a single video by URL

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Youtube - Retrieving feed from a single video by URL

radw_row
This post has NOT been accepted by the mailing list yet.
Hi there all,

i'm making some video website and i need some help. I'm making an admin control panel that takes from, for example, "http://www.youtube.com/watch?v=LWeiTlDrI28" the ID "LWeiTlDrI28" and after this take some information about this video like :

1.THUMBANIL
2.EMBLED CODE
3.TAGS

and i dont know for shure how to make that.

so far so good i made this

<?php
require_once 'Zend/Loader.php';
Zend_Loader::loadClass('Zend_Gdata_YouTube');

$yt = new Zend_Gdata_YouTube();
$query = $yt->newVideoQuery();
$url = 'http://gdata.youtube.com/feeds/api/videos/<yt:videoid>LWeiTlDrI28</yt:videoid>';  //error here

$videoFeed = $yt->getVideoFeed($url);

$videoFeed = $yt->getVideoFeed($query);
echo $query->queryUrl . "\n";

foreach ($videoFeed as $videoEntry) {
    echo "---------VIDEOO----------\n";
    echo "Title: " . $videoEntry->getVideoTitle() . "\n";
    echo "\n\n\n <br> <br>";
}
         
?>


If anyone can help me i would appreciate. I really need this for my school project.

Thanks, Row.
Reply | Threaded
Open this post in threaded view
|

Re: Youtube - Retrieving feed from a single video by URL

mbannonb
radw_row wrote
$url = 'http://gdata.youtube.com/feeds/api/videos/<yt:videoid>LWeiTlDrI28</yt:videoid>';  //error here
I think that should be this:

$url = 'http://gdata.youtube.com/feeds/api/videos/LWeiTlDrI28';