Return to Snippet

Revision: 41460
at February 18, 2011 10:55 by konkas


Initial Code
<?php 
  $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();
?>

Initial URL
http://ortanotes.tumblr.com/post/200469319/current-weather-in-3-lines-of-php

Initial Description


Initial Title
Current Weather in 3 lines of PHP

Initial Tags
php

Initial Language
PHP