Login   Register  
PHP Classes
elePHPant
Icontem

File: readme.txt

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Johan Barbier  >  Cities and zip codes  >  readme.txt  
File: readme.txt
Role: Documentation
Content type: text/plain
Description: Readme file
Class: Cities and zip codes
Lookup for cities and zip codes using AJAX
 

Contents

Class file image Download
[PHP5] && [PHP4]
This script is used to look for cities and zip codes, via xmlhttp request.

It is very simple :
If you input letters, the script will look for all the cities  and their zip code 
with a name beginning by these letters, and display them. Same stuff if you input 
numbers : the script will look for cities whose zip code begins with these numbers.

You can sort the list displayed, ordering them by the names, or the zip codes.

A joker is available : *
Use it to display ALL the cities (beware, it can take a loooong time...there are currently 
40000 cities in the data file).

Currently, the data file only contains all the French cities.
You can change the data file when you call the constructor of the 'ocity' class.
Data must be formatted that way :

city \tab||several_spaces zip_code\endline
city \tab||several_spaces zip_code\endline
city \tab||several_spaces zip_code\endline
...and so on