How to get the totalResults entry from the YouTube video API

Posted by ohana on Stack Overflow See other posts from Stack Overflow or by ohana
Published on 2010-05-19T00:53:48Z Indexed on 2010/05/19 1:00 UTC
Read the original article Hit count: 310

Filed under:
|

I'm using PHP and the YouTube API to get videos from YouTube to feed to my web app, but I don't know how to get the totalResults entry

Here is my code:

$yt = new Zend_Gdata_YouTube();
$query = $yt->newVideoQuery();
$query->setQuery($searchTerm);
$query->setStartIndex($startIndex);
$query->setMaxResults($maxResults);
$feed = $yt->getVideoFeed($query);

echo $feed->totalResults; // this desn't work

© Stack Overflow or respective owner

Related posts about php

Related posts about youtube-api