Visit CCSElite's Home Page!!


This sample demonstrates the use of a PHP Zipcode Range and Distance class by Micah Carrick. It uses AJAX and JSON to retrieve the city names and distance between the center of both zipcodes.  These will update automatically when you change the value of either zipcode.

The zipcode class can be found at http://www.micahcarrick.com/04-19-2005/php-zip-code-range-and-distance-calculation.html

It also demonstrates generating JSON data with PHP 4.x, which does not have the json_encode function. This is accomplished using a module by Michal Migurski and Matt Knapp which can be found at http://mike.teczno.com/json.html .

NOTE: You don't have to submit the form for the update to work. Just change a zipcode and hit TAB.

Lifetime Members can download the source for this project for FREE by clicking HERE

Zipcode Search
Zipcode 1   
Zipcode 2   
Miles