Dizideki Youtube VideoID ayrıntılı bilgi alın

0 Cevap php

I've been struggling with this for hours and i have no idea why is not working. I need to get Details from a VideoID using YouTube API and Zend, so i created a function like this

function listYoutubeVideo($id) {
$videos = array();

try {   
    $yt = new Zend_Gdata_YouTube();


    $videoFeed = $yt->getVideoEntry($id);
    foreach ($videoFeed as $videoEntry) {
        $videoThumbnails = $videoEntry->getVideoThumbnails();
        $videos[] = array(
            'thumbnail' => $videoThumbnails[0]['url'],
            'title' => $videoEntry->getVideoTitle(),
            'description' => $videoEntry->getVideoDescription(),
            'tags' => implode(', ', $videoEntry->getVideoTags()),
            'url' => $videoEntry->getVideoWatchPageUrl(),
            'flash' => $videoEntry->getFlashPlayerUrl(),
            'dura' => $videoEntry->getVideoDuration(),
            'id' => $videoEntry->getVideoId()
        );
    }
} catch (Exception $e) {
}

return $videos;
}

I işlevini önbelleğe istiyorum çünkü bir dizi ve fonksiyonu ile bunu yapmanın sebebi im.

Ben sadece yemlerin diğer türleri için getVideoEntry değiştirerek aynı birini kullanın ve çalışır, kodu ile sorunun ne olduğunu hiçbir fikrim yok.

0 Cevap