Skip to content

Instantly share code, notes, and snippets.

@smonteverdi
Created March 7, 2012 15:53
Show Gist options
  • Save smonteverdi/1993925 to your computer and use it in GitHub Desktop.
Save smonteverdi/1993925 to your computer and use it in GitHub Desktop.
PHP: Get Weather From Google API
$xml = simplexml_load_file('http://www.google.com/ig/api?weather=ADDRESS');
$information = $xml->xpath("/xml_api_reply/weather/current_conditions/condition");
echo $information[0]->attributes();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment