Help with an RSS Feed

Posted by Pete Herbert Penito on Stack Overflow See other posts from Stack Overflow or by Pete Herbert Penito
Published on 2010-06-17T18:37:15Z Indexed on 2010/06/17 18:43 UTC
Read the original article Hit count: 262

Filed under:
|
|

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!

© Stack Overflow or respective owner

Related posts about php

Related posts about Xml