This is a rewritten version of this class I found somewhen (don't remember when or where), but now for Yii framework.
$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);
Total 2 comments
Currently, it only works for US zip codes, however, it is planned an implementation for international zip codes.
Is this extension US-only? Why don't you mark it in page title/extension name?
Leave a comment
Please login to leave your comment.