adorablesites.com adorablesites.com
  Index Page :> About Us :> Place Your Link :> Privacy :> Terms of Use :> Add Article
Search:   
 
 

Third World to First World in 4.5 Seconds; Not So Fast!

It takes a lot to go from Third World to First World and it seems that many countries are forced to ... - Lance Winslow
 

The Command to Work

A Christian who is able to work must work just as God and Jesus Christ work. Failure to work leads t ... - Alan D Campbell
 

RSS FEEDS: Whither Thou Go'est?

I open up the 'Feed Reader' every day on my laptop and cruise the 'news feeds' I 'subscribe' to. The ... - Tony Dean
 
 

The Unknown Soldier - Thank You For Your Service

In central Baghdad a car bomb explosion killed four people and severely wounded CBS correspondent Ki ... - Matthew Alper
 

White Sun - The Underworld Emperor

There are Ten Tribunals and Ten Emperors in the Underworld. In the Fifth Tribunal, the Emperor is "S ... - Teow Aun Chew
 
 

Index Page –› Events & News –› RSS News Feeds
 

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

Author: Mikel Beck
 
Author Bio:
Mikel Beck is an authority in this industry. Mikel has written several articles in the past on this subject.
 
 
 

Related Articles

 
Sea Pollution
 
Web Coach Tip: Top 7 Ways to Spice Up Your Web Site's Audio Greetings
 
Controversy Continues Between Home Builders Association and Orlando Schools
 
The Reason There Can Never Be Peace on Earth
 
Lance Rants on $70.00 per Barrel Oil Prices
 
How Non-technical Webmasters are Harnessing the Power of RSS
 
Bible Prophecy 2-"Earthquakes & War"
 
The Command to Work
 
Internet Radio Broadcasting - About Bitrates
 
OSHA Needs Rules and Regulations Overhaul
 
 
 
Multiple links exchange
 
 

Health & Therapy

 

Finance & Banking

 

Music & Entertainment

 

Realty & Property

 

Self Healing

 

Hotels & Travel

 

Drink & Food

 

Jobs & Careers

 

Lifestyle & Fashion

 

Software & Networking

 

Automotive

 

Healthcare & Medicine

 

Government & Politics

 

Home & Garden

 

Research & Science

 

Business & Services

 

Outdoor & Sports

 

Culture & Art

 

Children

 

Online & Board Games

 

Events & News

 

Shopping Online

 

Society & Issues

 

Academics & Learning


 
Index Page :> Privacy :> Terms of Use  
Copyright © www.adorablesites.com - All Rights Reserved Worldwide.