Sid: Grab a database of all locations in the world. Something like GeoPlaces, They provide a .tsv file. Import the places file into your mysql table using mysqlimport. Then just search over that table, making sure that the place names is an index. Using an external service for what you need is going to be slower and you would presumably want to use the locations for some purpose anywya.