Help with an RSS Feed
- by Pete Herbert Penito
Hi Everyone!
I've spent ages on this, all I'm trying to do is extract the "title" contents from an rss feed, everything else can be ignored. I've looked into simplepie, magpie and all that stuff, but I feel its kind of overkill for what I need to do. I realise there are google gadgets that are made that can do this, but I didn't want all the google logo stuff, and I wanted to personally make this.
theres a whole bunch of unneeded tags thats coming in from the rss feed all I need is the title tag, it looks like this <title> My Title 3.0 </title>
My server has PHP 5+ so I know I can use some of these simple xml functions which look promising.
so far I've got
<?php
$blogfeed = file_get_contents("http://myblog.blogspot.com/feeds/posts/default?alt=rss");
echo $blogfeed;
?>
And it gives me all the data, I was thinking of running through it with strpos and searching for <title> but is there any easier way to do this??
Thanks alot!