List Info

Thread: Newbie question - getFeed not working




Newbie question - getFeed not working
user name
2007-09-07 15:25:25
Hi!

I´m new to Zend Framework (quite new to PHP also . I wrote
my first piece
of code, and it's not working:

require_once 'Zend/Loader.php';

Zend_Loader::loadClass('Zend_Gdata');
Zend_Loader::loadClass('Zend_Gdata_Query');

$gdata = new Zend_Gdata ();
$query = new Zend_Gdata_Query
('http://gdata.youtube.com/feeds/standardfeeds/top_rated
');
$feed = $gdata->getFeed($query);

It executes everything but the last line. Any ideas?

Thanx

Adrian

-- 
View this message in context: http://www.nabble.com/
Newbie-question---getFeed-not-working-tf4403595s16154.html#a
12562668
Sent from the Zend gdata mailing list archive at
Nabble.com.


Re: Newbie question - getFeed not working
user name
2007-09-07 20:15:32
Hi Adrian,

Why do you believe the last line is not getting executed?

The following code works for me to print out the name of the videos.

Note: to get some of the data other than simple things like video titles will require navigating the extension elements.  This might be a little difficult if you're new to PHP.  We're working on adding specific support and samples for YouTube:
http://framework.zend.com/issues/browse/ZF-1918

If you want to get the extension elements, call:
$extensions = $entry->;getExtensionElements();

That'll give you an array of Zend_Gdata_App_Extension_Element objects:
http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_App_Extension_Element.html

<?php
require_once 'Zend/Loader.php&#39;;

Zend_Loader::loadClass(9;Zend_Gdata');
Zend_Loader::loadClass(&#39;Zend_Gdata_Query&#39;);

$gdata = new Zend_Gdata ();
$query = new Zend_Gdata_Query('; http://gdata.youtube.com/feeds/standardfeeds/top_rated');
$feed = $gdata->;getFeed($query);
foreach ($feed as $entry) {
  echo $entry->;getTitle()->text . "<br />";;
}
?>;


On 9/7/07, adriank < adriankohan.name">adriankohan.name> wrote:

Hi!

m new to Zend Framework (quite new to PHP also . I wrote my first piece
of code, and it's not working:

require_once 'Zend/Loader.php&#39;;

Zend_Loader::loadClass(9;Zend_Gdata');
Zend_Loader::loadClass('Zend_Gdata_Query');

$gdata = new Zend_Gdata ();
$query = new Zend_Gdata_Query
(9;http://gdata.youtube.com/feeds/standardfeeds/top_rated' );
$feed = $gdata->;getFeed($query);

It executes everything but the last line. Any ideas?

Thanx

Adrian

--
View this message in context: http://www.nabble.com/Newbie-question---getFeed-not-working-tf4403595s16154.html#a12562668
Sent from the Zend gdata mailing list archive at Nabble.com.


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )