Book Image

PHP Web 2.0 Mashup Projects: Practical PHP Mashups with Google Maps, Flickr, Amazon, YouTube, MSN Search, Yahoo!

By : Shu-Wai Chow
Book Image

PHP Web 2.0 Mashup Projects: Practical PHP Mashups with Google Maps, Flickr, Amazon, YouTube, MSN Search, Yahoo!

By: Shu-Wai Chow

Overview of this book

A mashup is a web page or application that combines data from two or more external online sources into an integrated experience. This book is your entryway to the world of mashups and Web 2.0. You will create PHP projects that grab data from one place on the Web, mix it up with relevant information from another place on the Web and present it in a single application. This book is made up of five real-world PHP projects. Each project begins with an overview of the technologies and protocols needed for the project, and then dives straight into the tools used and details of creating the project: Look up products on Amazon.Com from their code in the Internet UPC database A fully customized search engine with MSN Search and Yahoo! A personal video jukebox with YouTube and Last.FM Deliver real-time traffic incident data via SMS and the California Highway Patrol! Display pictures sourced from Flickr in Google maps All the mashup applications used in the book are built upon free tools and are thoroughly explained. You will find all the source code used to build the mashups used in this book in the code download section for this book.
Table of Contents (11 chapters)

Summary


We have taken a look at two web services to get our feet wet. The Internet UPC Database is an XML-RPC based service. While the ECS is available in both SOAP and REST flavors, we used the simpler and more popular REST tools. The mashup we created looked up product information from the Internet UPC Database and passed it to ECS. We found how much the product cost on Amazon.com and integrated ECS’s shopping cart operations to create a shopping cart on our site. Finally, the user can purchase the items directly from Amazon.

In creating our mashup, we created a couple of object tools to call XML-RPC and REST services. REST usually returns a XML document to the caller. Using PHP’s SAX function, we created an extensible object-oriented parser for XML. We will use these tools later in other projects.

XML-RPC and REST are the most simple web services. As we progress to later projects, we will see more complex protocols like SOAP.