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 5. Traffic Incidents via SMS

Project Overview

What

Deliver content from the California Highway Patrol Live Incidents website to mobile users through Short Messaging Service (SMS)

Protocols Used

Not applicable

Data Formats

RSS

Tools Featured

PHP’s DOM Extensions

APIs Used

411Sync

And, on this project, we will learn how to use the dark arts. No, I’m not talking about controlling mindless zombies through black magic. I’m talking about screen-scraping.

In this project, we will screen-scrape from the California Highway Patrol website. The CHP maintains a website of traffic incidents. This site auto-refreshes every minute, ensuring the user gets live data about accidents throughout the state of California. This is very valuable if you are in front of a computer. If you are out and about running errands, it would be useless unless you had an Internet-enabled personal digital assistant. Even then, the site uses JavaScript and frames, and may not work on many PDA web browsers. More widely available than...