php - How to use dynamic weather forecast and a database of the same on my website?

49

I have a website on which I want weather forecast to be displayed but in a very specific manner. Suppose, a visitor visits my website and searches for "Mumbai" in my weather forecast text box. Then, he would get the weather forecast for "Mumbai" for the next few days. In the same manner it should happen for other cities too.

Could anyone over here help me out on this?

375

Answer

Solution:

Use a widget ...

        <iframe marginheight="0" marginwidth="0" name="wxButtonFrame" id="wxButtonFrame" height="110" src="http://btn.weather.ca/weatherbuttons/template5.php?placeCode=INXX0026&category0=Cities&containerWidth=150&btnNo=&backgroundColor=blue&multipleCity=0&citySearch=1&celsiusF=C" align="top" frameborder="0" width="150" scrolling="no" allowTransparency="true"></iframe>

c/o http://www.theweathernetwork.com/

Maybe you want to look at using a weather webservice:

As you have not really articulated how you want a database integrated with this question ... this is the best i have for you!

  1. Get the data
  2. Display the data

You really don't need to store the data unless you have millions of requests ... at which point, caching the results is a good idea...

People are also looking for solutions to the problem: php - Facebook Real Time update not working as expected

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.