Skip to content

Instantly share code, notes, and snippets.

@mateuspontes
Created May 2, 2011 17:26
Show Gist options
  • Save mateuspontes/951959 to your computer and use it in GitHub Desktop.
Save mateuspontes/951959 to your computer and use it in GitHub Desktop.
Get current weather using Google API
$xml = simplexml_load_file('http://www.google.com/ig/api?weather=Teresina');
$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