PHP + mySQL solution which returns the CITY & STATE when a ZIP code is given...

matthewcaruana

New member
Apr 5, 2008
155
1
0
I'm looking for a PHP + mySQL solution which returns the CITY and STATE as a JSON reply, when provided with a zip code as a parameter.

For example:

Deep Gold | Home | Official Movie Site | Now Playing

Returns: {"responseResult":"true","city":"Beverly Hills","state":"CA"}

(If an invalid ZIP code is passed then a 'Not found' message will be returned by the solution which will allow the user to manually enter the city and state.)

Does anybody know of some library which provides this functionality?
 


You need a GeoLocation Database, or service. It's probably better to use a service so that you don't have to maintain the database (they're large tables, millions of records)