This package can be used to lookup for cities and the respective zip codes.
It uses AJAX to search a file database with cities and the respective zip codes using just the first few letters of the city that the user types in a form text input.
The class can submit an AJAX request to find the cities that match the typed letters and display the city names without reloading the whole page.
It can also search for zip codes if the user types the first numbers of the zip code to search.
The listing that is displayed may be sorted by city name or zip code.
The example uses a file database with French cities but it may be replaced by another file with city and zip code information of anywhere in the world.
ADDITION : I put 2 versions :
'villes_normal/' folder is the old version
'villes/' folder is the new version, with Phonex and Soundex searches and sorting added
Allows the creation of tar, gzip, bzip2, and zip archives, and the extraction of tar, gzip, and bzip2. Supports relative paths/no paths, comments, and recursing through subdirectories. Can write file to disk, allow user to download directly, or return file contents in a string or an array. Does not require any external programs to run. PHP must be compiled with '--with-zlib' for gzip and zip and '--with-bzip2' for bzip2. Supports creation of self-extracting zip archives. See readme for full details.
Get zip codes within a range from a given zip code
This class can be used to retrieve a list of United States zip codes within the range a given zip code with an accuracy of about 2 to 5 miles.
This class is based primarily on Zip Codes Range originally written by Scott Mattocks. This version that uses a more precise distance calculation method.
It searches in a MySQL database with a table preloaded with zip codes and the respective latitude and longitude coordinates.
The class stores the zip codes that are found and the respective distances in an array class variable.