2011
Google has a weather API which is very fast. It is able to show weather forecast of current condition and the following three days on many cities over the world. It is also able to show weather forecast based on longitude and latitude coordinate parameters. The returned forecast is in XML format. The API itself is undocumented by Google and may changed without notice. From many sources on the web, here's the URL of the Google weather API:
http://www.google.com/ig/api?weather=[cityname]
Replace [cityname] with your preferred city name. For example, if I want to show weather forecast of my capital city Jakarta, then the URL would be:
http://www.google.com/ig/api?weather=jakarta
The API then would return the weather forecast in XML format so you can parse it with your preferred XML parser or embed it on your application program.
I am also implementing the API on this web to show the weather forecast of my current location visually. Go here, if you'd like to test it out and don't hesitate to give responds if you find bugs or errors.
Posted under PHP categories.
Tagged: PHP, Google API, Scripting
Write Your Comments
* Your email is required to submit this form, and it will not be published or shared without your consent. We use your email address to show your avatar picture profile from Gravatar. Don't have one? Then sign up to gravatar and create your own here.
We also filters your comment against SPAM because we hate SPAM as much as you do. If your comment is recognized as SPAM then it will be moderated, otherwise it will shows up immediately.
823 Hits