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)

California Highway Patrol Incident Page


This section will examine the California Highway Patrol Incident page. A user can choose the area they are interested in, and the page will retrieve incidents for that area. We want to let users request traffic reports for the same areas, so we need to examine how this page creates content.

We will do this by dissecting the general HTML structure of the Incident Page. The Incident Page is located at http://cad.chp.ca.gov.

This page is divided into three frames. The bottom frame is just an informational and legal footer. There is a top frame that holds some navigation. The pull-down menu in the upper left corner labelled Areas lists the urban centres of California. The traffic incident content is in the middle frame. This data appears to be displayed in a table. There are columns for the time of the incident, type of incident, location, and the general neighborhood. When the areas pull-down is activated and a new area is selected, the content page refreshes...