Welcome Guest, Not a member yet? Register   Sign In
A Good Zip Code Database Schema
#5

[eluser]idealws[/eluser]
Hello,

I am new here to the forums as well as CI, but I am finding it to be very useful.

I noticed this thread about zip codes and figured I would give you what I have in hopes
it will be some help to you.

In the zip file you will find US zip codes something like 42,624 I believe it is complete.
Also I have included the Zipcode.php class that was listed in the wiki on this site.
I have modified the class to work with the database I have attached here. I hope this helps
those of you in need.

To use the class upload it to the library folder and call like so in your controller:

Code:
$this->load->library('zipcode');

After it has been loaded you can use it like this:
Code:
// Get the zip codes in range my miles
$this->zipcode->get_zips_in_range('92505', '10');

// Get the distance between two zip codes
$this->zipcode->get_distance('92505', '92555');

// Get the points for a zip code lat and lon
$this->zipcode->get_zip_point('92557');

// Get the zip details, lat, lon, city, stateprefix, state, county, areacode, timezone
$this->zipcode->get_zip_details('92557');

I think that pretty much sums it up. Again I hope this is some help to
those of you that were looking for a solution like myself.

Link to files: Download zip file

Regards,
Ray


Messages In This Thread
A Good Zip Code Database Schema - by El Forum - 01-02-2009, 10:52 PM
A Good Zip Code Database Schema - by El Forum - 01-04-2009, 04:30 AM
A Good Zip Code Database Schema - by El Forum - 01-05-2009, 09:38 AM
A Good Zip Code Database Schema - by El Forum - 06-19-2009, 11:10 PM
A Good Zip Code Database Schema - by El Forum - 06-30-2009, 12:17 AM
A Good Zip Code Database Schema - by El Forum - 10-09-2009, 01:01 PM
A Good Zip Code Database Schema - by El Forum - 10-16-2009, 02:32 PM
A Good Zip Code Database Schema - by El Forum - 03-19-2010, 12:55 AM
A Good Zip Code Database Schema - by El Forum - 11-05-2010, 11:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB