ziplocator Let you know the distance between two zip codes or the zipcode around a radius of X miles. Currently only for US.

  1. Requirements
  2. Usage
  3. Resources

This is a rewritten version of this class I found somewhen (don't remember when or where), but now for Yii framework.

Requirements

  • Yii 1.1.6 or above
  • A DBMS like MySQL, FirebirdSQL, PostgreSQL, OracleDB or any other.

Usage

  1. Decompress the file in application.extensions
  2. Import the SQL file into your DB
  3. Enjoy
$zip = new ZipLocator();
/**
 * Calculate the distance between two zip codes
 */
echo $zip->distance('00210', '00610');
/**
 * Load the Zip codes with 10 miles radius
 */
$zips = $zip->inradius('00210', 10);
var_export($zips);

Resources

1 0
7 followers
1 025 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: Others
Developed by: robregonm
Created on: Feb 28, 2011
Last updated: 11 years ago

Downloads

show all