質問

On Lot of websites we select country from a select list and next select list shows us the list of cities of that country. I have am trying to search method provided by any api which gives the name of cities when I pass the country name. In any language.

Also I have been unable to find any free sql table like

Country          City
----------------------
Australia        Perth
Australia        Sydney 
Japan            Tokyo

My ideal result would be

Country          City         Lat        Long
----------------------------------------------
Australia        Perth        3.35       14.7
Australia        Sydney       3.36       14.62
Japan            Tokyo        4.2        12.8

Update : We can find all countries list easily, even we also can get all cities in the world, but cities are not found along with country names, so we can not determine what city belongs to which country.

役に立ちましたか?

解決

I assume you're looking for something like http://dev.maxmind.com/geoip/.

I haven't used it but often heard about it, and it seems to be a good product.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top