How to add google weather forecast in php

How to use Google Weather forecast API in Php

Do you want to display your city Weather forecast by google api, Yes you can do so by php. Google provides Weather API to use on any website. Here Im showing you an example how to use that in php.

By this we can connect google api and that send us detail report about weather forecast of a city in xml format. now we need to go show on our website by the help php .

for showing images


temp_c['data'] ?>° C,

change temp_f['data']  to display in fahrenheit

            condition['data'] ?>

for forecast use these codes



day_of_week['data']; ?>

  low['data'] ?>° F - high['data'] ?>° F,
	            condition['data'] ?>

please check and update me


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>