11.07.2015 Views

AJAX and PHP

AJAX and PHP

AJAX and PHP

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

9<strong>AJAX</strong> RSS ReaderIn the last few years, the Web has become much more active than it used to be. Today, we see anexplosion of new sources of information, such as news sites appearing every day (such ashttp://www.digg.com <strong>and</strong> http://www.newsvine.com), <strong>and</strong> the growing trend of web life—weblogs (every person seems to have a weblog these days).As a natural reaction to this invasion of information, many systems that allow grouping, filtering,<strong>and</strong> aggregating this information have appeared. This is implemented in practice through websyndication, which is that form of syndication where parts of a website (such as news, weblogposts, articles, <strong>and</strong> so on) are made available for other sites or applications to use.In order to be usable by other parties, the data to be shared must be in a generic format that can belaid out in different formats than in the original source, <strong>and</strong> when it comes to such formats, RSS2.0 <strong>and</strong> Atom are the most popular choices.Learn more about the history of RSS <strong>and</strong> Atom in the Wikipedia—the link to the RSS page ishttp://en.wikipedia.org/wiki/RSS_(protocol).In this chapter, we'll analyze the RSS file format, then take a look at Google Reader (Google'sRSS aggregator), <strong>and</strong> then build our own RSS aggregator web page with <strong>AJAX</strong> <strong>and</strong> <strong>PHP</strong>.Working with RSSRSS is a widely used XML-based st<strong>and</strong>ard, used to exchange information between applications onthe Internet. One of the great advantages of XML is that it is plain text, thus easily read by anyapplication. RSS feeds can be viewed as plain text files, but it doesn't make much sense to usethem like that, as they are meant to be read by specialized software that generates web contentbased on their data.While RSS is not the only st<strong>and</strong>ard for expressing feeds as XML, we've chosen to use this formatin the case study because it's very widely used. In order to better underst<strong>and</strong> RSS, we need to seewhat lies underneath the name; the RSS document structure, that is.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!