Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: PHP XML and PHP Displaying RSS Feeds on your Website Using PHP Tutorial

RSS stands for Really Simple Syndication. RSS if a technology for distributing data from one site to another using XML. You can easily decode this XML stream and display the information contained in it on your web site.

Tutorial Details:

Code Beach - Displaying RSS Feeds on your Website Using PHP
Tech Network: MP3 Guide

Search:
All .NET ASP BREW C++ C# ColdFusion Delphi/Kylix HTML J2ME Java JavaScript Palm Perl PHP Pocket PC Python SQL Ruby Symbian Visual Basic XML

Submit Link
Displaying RSS Feeds on your Website Using PHP by: 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.


 

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
PHP XML and PHP Displaying RSS Feeds on your Website Using PHP Tutorial

View Tutorial:
PHP XML and PHP Displaying RSS Feeds on your Website Using PHP Tutorial

Related Tutorials:

Personalize your Website with skins - JavaWorld June 2001
Personalize your Website with skins - JavaWorld June 2001
 
Matchmaking with regular expressions - JavaWorld July 2001
Matchmaking with regular expressions - JavaWorld July 2001
 
Boost Struts with
Boost Struts with XSLT and XML
 
Test networked code the easy way
Test networked code the easy way
 
JSP Standard Tag Library eases Webpage development
JSP Standard Tag Library eases Webpage development
 
Rome
Rome Rome is a set of Atom/RSS Java utilities that make it easy to work in Java with most syndication formats.
 
FreeMarker FreeMarker 2.3.1 an open-source HTML template engine.
FreeMarker provides an easy way to get data from Java servlets into Web pages, and helps you keep graphic design separate from application logic. To use it, you encapsulate HTML in templates.
 

Free Web Site Hosting Services Below is the listing of the hosting providers providing free web hosting services. These services helps you building your sites even if you have no experience in HTML writing. Zero
 

Linux Hosting Plans Proxima Web-Hosting Our basic hosting packages include support for a wide variety of web technologies, backed by instant account management with our Personal Control panel. With our guaranteed
 
We are providing Downloadable Version of Mandrake 10.1 Community Edition Linux CD's.
We are providing Downloadable Version of Mandrake 10.1 Community Edition Linux CD's. Mandrake 10.1 Community Edition Linux Now Available Mandrake 10.1 Community Edition CD's Mandrake 10.1 Community, released in Sept. 16, 2004 is an incremental
 
We are providing Downloadable Version of Mandrake 10.1 Official Edition Linux CD's.
We are providing Downloadable Version of Mandrake 10.1 Official Edition Linux CD's. Mandrake 10.1 Official Edition Linux Now Available Mandrake 10.1 Official Edition CD's Mandrakelinux 10.1 Official is a new-generation Linux operating system for
 
We are providing Downloadable Version of Mandrake 10.1 Power Pack Linux CD's.
We are providing Downloadable Version of Mandrake 10.1 Power Pack Linux CD's. Mandrake 10.1 Power Pack Linux Now Available Mandrake 10.1 Power Pack CD's Power Pack is a Linux system that will appeal to all advanced users. It's great for Office
 
Connecting to MySQL database and retrieving and displaying data in JSP page
Connecting to MySQL database and retrieving and displaying data in JSP page Connecting to MySQL database and retrieving and displaying data in JSP page This tutorial shows you how to connect to MySQL database and retrieve the data from the
 
Struts Guide
Struts Guide Struts Guide This tutorial is extensive guide to the Struts Framework. In this tutorial you will learn how to develop robust application using Jakarta Struts Framework. This tutorial assumes that the reader is familiar with the web
 
Writing more than one cards in a WML deck.
Writing more than one cards in a WML deck. Tutorial First Card Writing more than one cards in a deck. In this lesson we will write application that uses two cards in a deck. First card is displayed only for some time and after that it directly
 
Web Hosting Guide. What is Web Hosting Plan?
Web Hosting Guide. What is Web Hosting Plan? What is Web Hosting Plan? Web hosting plan is the different plans provided by Hosting Companies for hosting your web site. Web hosting plans include the storage limit, bandwidth, access to server
 
What is Web Hosting
What is Web Hosting What is Web Hosting? What is Web Hosting? If you have a company and want web presence than you need a website. With the website any one from the world must be able to view your pages, images etc. Website is actually a
 
A Practical Roadmap for Deploying Enterprise Web Applications: Taking the First Step
This article covers important decision points around the availability, scalability, and security that are needed for enterprise web applications.
 
Integrating Java Open Single Sign-On in Pluto
This article shows how to integrate Java Open Single Sign-On in Apache\'s Pluto portlet container.
 
Urchin RSS Aggregator
Urchin is a Web based, customisable, RSS aggregator and filter. It\'s primary purpose is to allow the generation of new RSS feeds by running queries against the collection of items in the Urchin database.
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.