11.07.2015 Views

PHP MySQL - Stilson.net

PHP MySQL - Stilson.net

PHP MySQL - Stilson.net

SHOW MORE
SHOW LESS
  • No tags were found...

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

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

www.it-ebooks.infoCHAPTER 20 • WEB SERVICESIf any of the extensions are disabled, take a moment to reconfigure <strong>PHP</strong> accordingly. If you can’tremember how to do this, refer back to Chapter 2 for instructions. Once reconfigured, be sure to run thecompatibility test again to check your work.Parsing a Feed with SimplePieSimplePie performs the difficult task of parsing the feed for you, making the feed contents available viaan array of objects. All you need to do is use each object’s methods to retrieve select parts of the feed,such as each item’s title, publication date, and body. You can iterate over this array of objects usingstandard <strong>PHP</strong> constructs such as the foreach statement. Let’s give this functionality a try by parsing theWJGilmore.com RSS feed using an example based on one found on the SimplePie website:01 1617

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

Saved successfully!

Ooh no, something went wrong!