Book Image

PHP Programming with PEAR

By : Carsten Lucke, Stoyan Stefanov
Book Image

PHP Programming with PEAR

By: Carsten Lucke, Stoyan Stefanov

Overview of this book

<p>PEAR is the PHP Extension and Application Repository, and is a framework and distribution system for reusable, high-quality PHP components, available in the form of "packages". <br /><br />In this book, you will learn how to use a number of the most powerful PEAR packages available to boost your PHP development productivity. By focusing on these packages for key development activities, this book is an in-depth guide to getting the most from these powerful coding resources.<br /><br />You will become a master of various PEAR packages that help you with the essential tasks of PHP development such as:<br /><br />•&nbsp;&nbsp;&nbsp; Accessing databases with MDB2<br />•&nbsp;&nbsp;&nbsp; Displaying data in a range of formats (HTML, Excel spreadsheet, PDF)<br />•&nbsp;&nbsp;&nbsp; Creating and parsing XML documents<br />•&nbsp;&nbsp;&nbsp; Serializing PHP objects into XML, and unserializing XML documents to PHP objects<br />•&nbsp;&nbsp;&nbsp; Consuming and offering web services<br />•&nbsp;&nbsp;&nbsp; Accessing Web APIs including Google, Yahoo, Amazon, and Technorati</p>
Table of Contents (10 chapters)

Consuming Web Services


When working with web services, most people start by consuming a service that is offered by somebody else. There are two different reasons why you might want to consume a web service:

  1. 1. You need to access customer data that cannot be accessed just by sending queries to the database. The reason for this might be security or the use of a data source not supported by PHP. Often the reason might be that you also want to access business logic that somebody else in your company has already implemented in Java, for example.

  2. 2. You want to use a service provided by another company. For example, if you want to integrate a search into your website, why would you bother writing a new search engine, if you could just as well use the search service offered by Google and pay for using this service. It will probably still be cheaper than implementing all the features Google has to offer. The same applies if you want to build an online auction, sell books, etc. There already are...