Logo         Community
The Company
Your Account
Contact Us
Plugging RDF Content Into Your Web Site With PHP
A Web site which dynamically updates itself with the latest news and information? Nope, it's not as far-fetched as it sounds.

| Have Content, Will Syndicate |

We'll start with the basics - what the heck is RSS anyhow?

RSS (the acronym stands for RDF Site Summary) is a format originally devised by Netscape to distribute information about the content on its My.Netscape.Com portal. The format has gone through many iterations since its introduction in early 1997 - take a look at the end of this article for links to information on RSS's long and complicated history - but seems to have stabilized at RSS 1.0, an RDF-compliant version that is both lightweight and full-featured.

RSS makes it possible for webmasters to publish and distribute information about what's new and interesting on a particular site at a particular point in time. This information, which could range from a list of news articles to stock market data or weather forecasts, is published as a well-formed XML document, and can therefore be parsed, processed and rendered by any XML parser.

By making it possible to distribute a frequently-updated list of the latest information about a particular Web site, RSS opens the door to simple, easy content syndication over the Web. In order to understand how, consider the following simple example:

Site A, a news site (a "content syndicator"), could publish, on a hourly basis, an RSS document containing a list of the latest news from around the world, together with links to the full article on the site. This RSS document could be picked up by another Web site (Site B, a "content aggregator"), parsed, and displayed on Site B's index page. Every time Site A publishes a new RSS document, Site B's index page automatically gets updated with the latest news.

This kind of arrangement works for both organizations involved in the transaction. Since the links within the RSS document all point to articles on Site A, Site A will immediately experience an increase in visitors and site traffic. And Site B's webmaster can take the week off, since he now has a way to automagically update his index page, simply by linking it to the dynamic content being published by Site A.

Quite a few popular Web sites make an RSS or RDF news feed available to the public at large. Freshmeat, (http://www.freshmeat.net) and Slashdot (http://www.slashdot.org) both have one, and so do many others. I'll be using Freshmeat's RDF file extensively over the course of this article; however, the techniques described here can be applied to any RSS 1.0 or RDF file.

How to do Everything with PHP & MySQL
How to do Everything with PHP & MySQL, the best-selling book by Melonfire, explains how to take full advantage of PHP's built-in support for MySQL and link the results of database queries to Web pages. You'll get full details on PHP programming and MySQL database development, and then you'll learn to use these two cutting-edge technologies together. Easy-to-follow sample applications include a PHP online shopping cart, a MySQL order tracking system, and a PHP/MySQL news publishing system.

Read more, or grab your copy now!

previous page more like this  print this article  next page
In trog...
Logging With PHP
Building A Quick-And-Dirty PHP/MySQL Publishing System
Output Buffering With PHP
Date/Time Processing With PHP
Creating Web Calendars With The PEAR Calendar Class
In the hitg report...
Crime Scenes
Animal Attraction
Lord Of The Strings
In boombox...
Patience - George Michael
Think Tank - Blur
My Private Nation - Train
In colophon...
Hostage - Robert Crais
The Dead Heart - Douglas Kennedy
Right As Rain - George Pelecanos
In cut!...
American Chai
The Core
Find out how you can use this article on your own Web site!

Copyright © 1998-2018 Melonfire. All rights reserved
Terms and Conditions | Feedback