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)

Chapter 6. London Tube Photos

Project Overview

What

Plot London Tube station locations on Google Maps. When a station’s icon is clicked, search Flickr for photos of the station and display them on the map.

Protocols Used

REST

Data Formats

XML, RDF, JSON

Tools Featured

SPARQL, RDF API for PHP, XMLHttpRequest Object (AJAX)

APIs Used

Google Maps, Flickr Services

We have used a lot of techniques and APIs in our projects. For the most part, things have mashed up together fairly easily with minimal issues. One of the reasons for this is that we have relied on PHP to create the presentation for our mashups. This simplifies the architecture of our mashup and gives us a lot of control. Many APIs, though, are JavaScript-based, and hence, any mashup will rely heavily on JavaScript for the presentation. This introduces a lot of other issues that we will have to deal with. In this mashup, we will encounter some of those issues, and look at ways to work around them. PHP will remain an important part of our mashup...