Please, I have an RSS feed and need to get the source for every item. I'm using php and Samplepie.
for example the RSS feed is like that :
<?xml version='1.0' encoding='UTF-8'?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title>Landofcode.com web tutorials updates</title>
<link>http://www.landofcode.com</link>
<description>Web development tutorials</description>
<item>
<title>Wacky news story</title>
<link>http://www.reddit.com/r/wacky</link>
<description>Guy runs into a car and drives it!</description>
<source url="http://www.reddit.com/.rss">
reddit.com:what's new online!
</source>
</item>
<item>
<title>New HTML tutorials</title>
<link>http://www.landofcode.com/html-tutorials/</link>
<description>Five new HTML tutorials have been added</description>
</item>
</channel>
</rss>
and my code is like that :
...
$feed->set_feed_url('http://localhost/rss/flux/rss.xml');
$feed->init();
$feed->handle_content_type();
foreach ($feed->get_items() as $item){
echo $item->get_title();
echo $item->get_source();
}
but the function get_source() return NULL do you have any adea please