Get Current weather using google API


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. $xml = simplexml_load_file('http://www.google.com/ig/api?weather=ADDRESS');
  2. $information = $xml->xpath("/xml_api_reply/weather/current_conditions/condition");
  3. echo $information[0]->attributes();

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.