PHP Wrapper for Yahoo! GeoPlanet

Earlier this month I wrote a quick PHP wrapper for Yahoo!’s GeoPlanet API. It’s a super useful service for querying geographical information about nearly any place on earth — addresses, landmarks, colloquial locations, etc. Or, as the official description says GeoPlanet helps bridge the gap between the real and virtual worlds by providing an open, permanent, and intelligent infrastructure for geo-referencing data on the Internet. There were already Perl, Python, and Ruby wrappers. I figured I’d throw PHP into the mix. Pete Warden has already written some example code that uses the wrapper to emulate Twitter’s nearby location search. You …

Read more

Serving Static Content on Amazon S3 with s3up

I’ve written twice about using Amazon S3 to host your website’s static content. It’s a great solution for small websites without access to a real content delivery network. And now that Amazon has launched CloudFront on top of S3, it’s even better. But there are still ways we can improve the performance. The trick is to upload our files using custom headers so they’re served back with a proper expiration date and gzipped when possible — i.e., the techniques recommended by YSlow. I’ve written a command line tool which simplifies this process called s3up. The idea is simple. It uploads …

Read more