superoperator.com
Search:    Site Home >> About Us >> Privacy of Info >> Terms of Use >> Place Your Link >> Submit Article   
Add Url
 
 

Business & Services

 

Eating & Drinking

 

Teens & Kids

 

Recreation & Entertainment

 

Games & Play

 

Vehicles & Automotive

 

Computers & Software

 

Home Family & Garden

 

Investment & Finance

 

Travel & Vacation

 

People & Society

 

Fitness & Health

 

Law & Politics

 

Estate & Realty

 

Shopping & Auction

 

Self Help

 

Creative Arts

 

Healthcare & Medicine

 

Academics & Education

 

Technology & Science

 

Jobs & Employment

 

Sports & Adventure

 

Events & News

 

Relationship & Lifestyle


 

Site Home » Events & News » RSS News Syndication
 

Displaying an RSS Feed on Your Website Using PHP and MagpieRSS

 
Author: Mikel Beck
 

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

 
 
 

Related Articles

 
Is Sixty Years Too Long a Wait?
 
Economics 101: Triangle Trade
 
Understanding RSS - Part Eleven - A Full RSS Template File to Create Your Very Own RSS Feed
 
International Law, Dangerous Precedents, and Reality Check
 
Newsletter from East Africa July 2006
 
The Sexist Tragedy
 
Child Sacrifice
 
Vehicular Diuretic - To Use or Not to Use
 
When Birds Don't Fly: The Bird Flu
 
President Bush Incorrectly Interprets the Laws to His Favor? Say Liberals
 
 
 
 

New York Personal Injury Lawyers

Injury to a person that is caused by an automobile accident, accident at work or by someone else's n ... - Damian Sofsian
 

The 5-minute Guide To Using Web Audio Plus

Web Audio Plus is a software program that converts your audio files into a file that you can use on ... - Douglas Taylor
 

Top of Truck Advertising to Pay for Improved Aerodynamics for Fuel Economy

Trucking costs have skyrocketed due to fuel price increases and those costs have been passed onto th ... - Lance Winslow
 
 

The Great Resurrection Debate

I watched a program the other night featuring the Resurrection. On this program were theologians, de ... - Anthony Smith
 

Tsunami Aftermath

On December 26, 2004 a massive tsunami swept through Thailand killing thousands of people, and chang ... - Ryan Fyfe
 

Make Your Website Talk

Have you noticed the latest online craze? No, it's not how to make a million dollars overnight, alth ... - Merle Stinnett
 

Autos, Choosing The Right One For You!

Autos are essential within many of our lives. Simply living in a big city may mean that we have to d ... - Mike Wall
 

Chindia - The Decline of the U.S and Personalisation

China and India, "Chinida" are well placed to dominate the world. The United States, it's economy an ... - Stuart Oliver
 
 
Site Home >> Privacy of Info >> Terms of Use
© 2008 www.superoperator.com All Rights Reserved.