Posted By

konkas on 02/18/11


Tagged

php weather


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

Hepamin
luman
robotici


Current Weather in 3 lines of PHP


 / Published in: PHP
 

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

  1. <?php
  2. $xml = simplexml_load_file('http://www.google.com/ig/api?weather=ADDRESS');
  3. $information = $xml->xpath("/xml_api_reply/weather/current_conditions/condition");
  4. echo $information[0]->attributes();
  5. ?>

Report this snippet  

You need to login to post a comment.