Dec
18

Magpie RSS is a PHP RSS aggregator script. It makes consuming a feed as easy as pie! (Pun intented!)
All you do is:
- Upload the Magpie scripts to your site.
- Create a page that will display your feeds.
- Include the Magpie script in your page.
- Enter the following code to display your feeds:
<h2><a href=”http://maxkaizen.com” title=”Max1m blog”>Max1m’s blog</a></h2>
<p>
<ul>
<?php
$rss = fetch_rss(’http://maxkaizen.com/feed/’);
if (is_array($rss->items)) {
$items = array_slice($rss->items, 0, 3);
foreach ( $items as $item ) {
echo “<li><a href=\”".$item['link'].”\” title=\”".$item['title'].”\”>”.$item['title'].”</a></li>”;
}
}
?>
</ul>
</p>
You create a RSS array by declaring it $rss = fetch_rss(’the_url’);
This goes to the URL and fetches the feed and load it into an array. You can then manipulate the array to get what you want from it. I sliced the array show only the latest 3 posts ($items = array_slice($rss->items, 0, 3);)
Then you simply loop through the array of items or posts and format them for display.
Really, REALLY simple and easy to use!
I’ve made a hack on this blog. See the Eat THIS! and Eat THAT! links on top under the logo? Go to those pages to see the aggregated feeds. (Eat THIS is feeds aggregated from my friends blogs and Eat THAT is from some of my favorite sites.)
Download the example files by clicking here.
technorati tags:rss, magpierss, rssaggregator
Blogged with Flock
Sharing is caring:These icons link to social bookmarking sites where readers can share and discover new web pages.
Kick-ass Tools, RSS, Techie stuff, web development Stii
Nov
10
What is RSS? What can I do with it? These were my 2 first questions when I head about it! Lets look at it.
What is RSS?
RSS stands for “Really Simple Syndication”.
Lets first look at an example of RSS in use. Lets say you have a web site and you publish lots of news on a very regular basis. In the “old” days ( I say old, which is actually the days before you heard of RSS!), a visitor to your web site would have to revisit your site every single time he wants to see whats new(s) on your web site. On the technical side, if somebody liked the articles you have on your web site and would like to publish your articles on their site, he first needed to contact you and make arrangements and some special development on his site to get your news on his site, or even worse, he would have to copy-and-paste your articles physically into his site!
Then you heard of RSS and decided to create a RSS Feed of your latest articles. You asked your web developer “Please RSS enable all my news articles!”. So your web developer write some interesting scripts that reads your news articles and formulate it in a standardized XML format, ready for the people in the world wide web to consume your RSS news feeds.
NOW the guy that used to visit you web site on a daily basis just to see if there is any new articles can copy your special RSS link into his favorite RSS reader and he can on a daily basis go check his reader for any new articles on a number of his favorite sites including yours. It will “download” the latest articles into his reader and saves him a lot of time and dissappointment of going to your site first and seeing “Oh dear, nothing new here…” and then decide later on “Oh dear, I’m not wasting another second on this guy’s web site. I’m not visiting it again!”.
The other guy that wants to publish your articles (with a link back to your site of course!) on his web site can now, without even contacting you, read your feed with some scripts on his site and display your latest articles on his site. He can do that easy, because he KNOWS the format that your feeds are in due to the standardized format of the RSS XML files.
Getting started
Get a RSS reader and subscribe to other sites feeds. This will help you see the value of RSS feeds best! There is quite a few readers out there that will help you manage your feed subscriptions. (Personally, I manage my feeds using the Firefox Web Browser. It has got a built in RSS reader and is one of the best web browsers available.) Download it at http://www.getfirefox.com

Now go surf the web for your favorite topics. Wherever you see a RSS icon, simply click on it and it will ask you if you would like to subscribe to this feed. Say yes!

Tommorrow, first thing you do when you are online is go to your bookmarks and check if there is any new sites listed in the feeds you subscribe to. If there is nothing new, you don’t have to waste time going to the site just to find out there is nothing new!
powered by performancing firefox
Sharing is caring:These icons link to social bookmarking sites where readers can share and discover new web pages.
RSS, browsers, firefox, flock Stii