Home arrow PHP arrow Page 2 - Plugging RDF Content Into Your Web Site With PHP

Have Content, Will Syndicate - PHP

A Web site which dynamically updates itself with the latestnews and information? Nope, it's not as far-fetched as it sounds. Asthis article demonstrates, all you need is a little imagination, acouple of free RDF files and some PHP glue.

TABLE OF CONTENTS:
  1. Plugging RDF Content Into Your Web Site With PHP
  2. Have Content, Will Syndicate
  3. Switching Channels
  4. Fresh Meat
  5. Capture The Flag
  6. Nesting Time
  7. Back To Class
  8. Adding A Little Style
  9. Homework
By: icarus, (c) Melonfire
Rating: starstarstarstarstar / 19
February 27, 2002

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement
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.

 
 
>>> More PHP Articles          >>> More By icarus, (c) Melonfire
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

PHP ARTICLES

- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: