2007-05-28
Updated June 26, 2007
The method here has been revised; see the entry for June 26.
In yesterday's entry I said my hosting company's PHP didn't support EXIF, which my photo-mapping PHP script requires, and that I didn't know of any that did. I didn't spend the five minutes it would have taken to Google for "php hosting exif" yesterday, but I did this morning and came up with A2 Hosting. They have PHP with EXIF (and much more) installed by default, and their plans start at $2.95 a month with no setup cost. It took less than 10 minutes for A2 to set up my account and send me login instructions. (I took a more expensive plan at $4.95, less if you pay for several months in advance, because it offered 10 times the storage and MySQL, which my photo maps don't need, but other things do.)
If you just want a place to host your photo maps that you're going to link to from your main site, you don't need a domain name for your A2 site. When you sign up, choose the option to use a domain that you're going to enter into the name server yourself (I think it's the last of the three choices) and make up a domain that neither you nor anyone else will ever use, such as basepathannexdomainA2.com, which is what I used. That domain will never work (since neither they nor I are going to register it), so I use the alternate URL which in my case is www20.a2hosting.com/~rochkind (go ahead and click on it).
As I said yesterday, you need a Google Maps API key. Go to http://www.google.com/apis/maps/signup.html and enter your A2 URL, which in my case is "http://www20.a2hosting.com/~rochkind". You get your key right away; you don't even have to tell Google who you are. Then copy and paste that key into the gpsmapper.php file, which you can get here as a text file. (Change the extension to ".php" before copying it to your web site.)
With your FTP program, create a subdirectory if you like, make a subdirectory of it called "images", copy your JPEGs to "images", copy your modified gpsmapper.php file to the parent directory of the "images" directory, and you're done.
In my case, I created the subdirectory "photomaps/demo" (two levels of subdirectories, actually), copied my images to "photomaps/demo/images" (after creating that subdirectory), copied gpsmapper.php to "photomaps/demo" (not to the "images" subdirectory), and so the URL became "www20.a2hosting.com/~rochkind/photomaps/demo/gpsmapper.php".
It's a little neater to name the gpsmapper.php file "index.php" so the URL becomes just "www20.a2hosting.com/~rochkind/photomaps/demo", and you can do it that way if you like.
So now you can make photo maps with no script programming at all, unless you count pasting in your API key as programming, which I don't.