从邮政编码php获取gps坐标

is there a way to get gps coordinates from a zip code in php? for example, I have a mysql table with customers and their address and zip codes, I would like only to use the zip codes to generate the json file with gps coordinates, is something like that possible? After that I would use that json file to show customers on google maps. thanks in advance

Google offers a geocoding api. Send an http request such as:

http://maps.googleapis.com/maps/api/geocode/json?address=55309&sensor=false

Where 55309 is your the desired zipcode.

Then you can parse the xml or json accordingly to get the longitude and latitude.