May 29th, 2007

How to find postal codes within a radius in PHP

Local search is quickly becoming one of the hottest topics in online marketing and search in general. It's becoming much easier to search online for a local pizza shop than it is to check the yellow pages!

If you're looking to build a localized directory, one of the most important features is the ability for users to be able to enter their postal code and find results within a certain distance or radius. In the past I posted the SQL code to do a lookup and return the longitude/latitude (geocode), but here's a PHP class that is a pre-packaged way of doing this, so you can easily add the functionality to your web app!

One Response to ' How to find postal codes within a radius in PHP '

Subscribe to comments with RSS or TrackBack to ' How to find postal codes within a radius in PHP '.


  1. on May 31st, 2007 at 5:44 pm

    wow thats amazing! I've been wanting to do just this lol!

Leave a reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-Spam Image