CHAPTER 20 WEB (Make a web site) SERVICES [channel] => Array

CHAPTER 20 WEB SERVICES [channel] => Array ( [title] => Jason Gilmore [link] => http://blogs.apress.com/ [tagline] => ) [textinput] => Array ( ) [image] => Array ( ) [feed_type] => RSS [feed_version] => 2.0 [encoding] => ISO-8859-1 [_source_encoding] => [ERROR] => [WARNING] => [_CONTENT_CONSTRUCTS] => Array ( [0] => content [1] => summary [2] => info [3] => title [4] => tagline [5] => copyright ) [_KNOWN_ENCODINGS] => Array ( [0] => UTF-8 [1] => US-ASCII [2] => ISO-8859-1 ) [stack] => Array ( ) [inchannel] => [initem] => [incontent] => [intextinput] => [inimage] => [current_field] => [current_namespace] => [last_modified] => Mon, 26 Sep 2005 19:43:48 GMT [etag] => “50e4-413-fa6a7a9f” ) Note the presence of the four object attributes in each element of the items array. While the summary and description attributes may seem redundant, this information is replicated because Magpie supports both RSS and an alternative syndication format known as Atom (http://www.intertwingly.net/wiki/pie/FrontPage), which uses the attribute Summary instead of Description. When retrieving RSS values using the Magpie methods, which are introduced soon, such redundancy will be neither apparent nor relevant. Following items is the channel array, which contains information pertinent to the feed in general, including the feed title, domain, and other attributes not shown in the example feed. Finally, information pertinent to the feed s technical aspects is offered, including the encoding type, date of last modification, and RSS version. Of course, for most users, only the information found in the itemsand channel arrays is of interest, so don t worry too much about the attributes that aren t particularly familiar. The following examples demonstrate how the data is peeled from this object and presented in various fashions. Retrieving an RSS Feed Based on your knowledge of Magpie s parsing behavior, rendering the feed components should be trivial. Listing 20-2 demonstrates how easy it is to render a retrieved feed within a standard browser.
If you are in need for chaep and reliable webhost to host your website, our recommendation is http web server services.

Leave a Reply