Share this post! | Vote this! |
|
Google has a lot of APIs which any developer can use to add a bit more interaction to your application. Some of the APIs need an API key to access the data you want, but there are others which don’t need any API key at all.
The Google weather API allows you to send it a location from anywhere in the world and get the current weather and the future weather.
In this tutorial you will learn how to create a quick and easy weather application in PHP using the Google Weather API.
Google Weather API
Google has loads of APIs you can use to get different data from the massive amount that Google can get a hold of. Click on the link below to view all the APIs you can use from Google.
Google APIs
You will see from this list that the Google Weather API isn’t on here but that doesn’t mean you can’t use it.
To get to the weather from Google just use the following URL.
1 http://www.google.com/ig/api?weather=$location
This will return an XML document with data about the location, current weather and future weather. Using PHP it’s very easy to consume this data and use XPATH to get at the data you want.
More...
0 comments:
Post a Comment