If you’re not familiar with the general syntax of an RSS feed, Listing 20-1 offers an example that will be used as input for the scripts that follow. Although a discussion of RSS syntax specifics is beyond the scope of this book, you’ll nonetheless find the structure and tags to be quite intuitive (after all, that’s why they call it Real Simple Syndication). Listing 20-1. A Sample RSS Feed (blog.xml) <?xml version="1.0" encoding="iso-8859-1"?> <item> <item> <item> This example doesn’t take advantage of all available RSS elements. For instance, other feeds might contain elements describing the feed’s update interval, language, and creator. However, for the purposes of the examples found in this chapter, it makes sense to remove those components that have little bearing on instruction. Now that you’re a bit more familiar with the purpose and advantages of RSS, you’ll next learn how to use PHP to incorporate RSS into your own development strategy. Although there are numerous RSS tools written for the PHP language, one in particular offers an amazingly effective solution for retrieving, parsing, and displaying feeds: MagpieRSS. Please check back next week for the continuation of this article.
blog comments powered by Disqus |