Chapter 10. Fun Stuff
Hacks 95–100: Introduction
PHP coding isn’t always about writing accounting applications. This chapter contains hacks that cover the fun side of PHP. From creating your own Google maps, to building an MP3 server, to uploading Wikipedia to your PlayStation Portable (PSP), this chapter’s all about the frivolous side of PHP.
Create Custom Google Maps
Use the Google Maps API to embed dynamic maps into your application with custom markup, overlays, and interactivity.
In what little spare time I have, I love to hike around my neighborhood in Fremont, California. Thankfully, some of the best hiking in the Bay Area is just a walk away. In particular, the hike up Mission Peak is tremendous, both for its scenic vista and for the great workout.
Start by saving the code in Example 10-1 as index.php.
<?php $images = array( array( 'lat' => -121.9033, 'lon' => 37.5029, 'img' => "mp0.jpg" ), array( 'lat' => -121.8949, 'lon' => 37.5050, 'img' => "mp1.jpg" ), array( 'lat' => -121.8889, 'lon' => 37.5060, 'img' => "mp2.jpg" ...