Home     Sitemap
Home > Articles

Displaying an RSS Feed on Your Website Using PHP and MagpieRSS

These days everybody wants to have fresh content on their web site. Search engines like to see dynamic web pages, where the content is updated on a regular basis. Static pages that have information that doesn't change are not only boring, but less likely to be visited by a search engine spider than a page that changes every time it is displayed.

By using RSS and the MagpieRSS toolkit, you can import data from another web site or news source and display that information on your own site.

First, download the MagpieRSS kit from http://magpierss.sourceforge.net.

Next, unpack the archive, into a directory off your root on your web site called "rss".

Then, create a directory off your root called "cache". CHMOD this directory to 777.

You'll need to know the URL for the feed that you want to display. You can find this by searching for "RSS feed" in Google, or by going to one of the many sites that allow you to search thrown various sources for feeds. Syndic8.com is one, for example.

To display data from a single source, you can use code similar to this:

require_once('rss/rss_fetch.inc');

$news_feed = '';

error_reporting(E_ERROR);

$rss = fetch_rss("http://www.url-of-the-rss-feed.com"); $items = array_slice($rss->items, 0); foreach ($items as $item ) {

$news_feed .= '' . $item['title'] . '' . $item['summary'] . ''; }

echo $news_feed;

MagpieRSS not only decodes the data, but it will also cache the data so it will retrieve news articles only once per hour.

Utilizing RSS in this fashion will allow your web site to have fresh content displayed constantly, and will (hopefully!) keep the search engine spiders interested in your site. The more the spiders index your site, the more pages you will have listed in the search engines. And with more pages listed in the search engine indexes you have a much better chance of attracting people to your web site.

Copyright 2005 by Mikel Beck. mikel.beck@elite-computing.net

Mikel Beck is the owner of a number of web sites, the latest being The Happy Hour Pub.

Article Source: http://EzineArticles.com/?expert=Mikel_Beck



Related Links:


Business Podcast Marketing Case Study Proves Results

Fed Up With FM - Podcasting

Podcasting: The "NEXT BIG THING" on the Internet

Teleseminars, Audio Downloads, Podcasts: Listen Up So You''ll Learn and Earn More

Video Podcasting


Everything you need to know about blogging, rss to podcasting, etc.

RSS Feeds for Teachers Can Stop Classroom Management Problems and Streamline Your Time

(Submitted by: Ruth Wells)

It may be a new year, but you are probably still dealing with the same old "kid problems." The bad attitudes, disrespect, peer conflict, lying, school failure or family problems didn't change when you flipped the page on the calendar. Don't ... Read article

RSS Revolution and Definition

(Submitted by: Vinay Rana)

RSS (Really Simple Syndication) is channelizing or syndicating the flow of content from different sources to different target WebPages or websites.It has helped in content providing website to distribute their data across the globe using ... Read article

Displaying RSS Feeds on Your Web Page

(Submitted by: Sanjay Johari)

RSS feeds have made it very convenient to syndicate information from various sources. Most of websites and services that publish fresh content, such as ezines, press release, new agencies, blogs make their content available thru RSS feeds. As new ... Read article

RssToBlog Review

(Submitted by: Tony Guribal)

Here is review of RSStoBlog by an owner of the product The RSStoBlog software is an wonderful piece of automation. Developed by the author to have all blogs updated, it has evolved into a feature packed auto blogger update package. No ... Read article

The Basics of RSS

(Submitted by: Jonathan Coupal)

RSS stands for Really Simple Syndication, and it is a standard, public format designed for sharing headlines and the content of web sites (previously known as the RDF Site Summary). But RSS feeds are not just for news anymore. Almost anything ... Read article


More articles

1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92
 
 
 
Home
Our Blog
Blogging
What is RSS?
Free Downloads / Tools
Open Source Blogs
Free Blog Providers and Hosting
Blog Directory And RSS Submission Sites
Make Money with Your Blogs
Articles
Sitemap
RSS & Blog Directories
Our Articles RSS Feed
 


 
Back To Top
Copyright © 2006 RSSBlogSubmit, All Rights Reserved
Home | Articles | Sitemap | Resources