Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6241123
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:42:08+00:00 2026-05-24T11:42:08+00:00

I am using yahoo weather feed and simplepie to get weather for my digital

  • 0

I am using yahoo weather feed and simplepie to get weather for my digital display. Since it is a website run on a screen, I can’t refresh the browser all the time manually.

I am just wondering is there anything eg jquery or php doc can help me update the weather information periodically as the weather changes?? If so would you be able to give me some directions on how to implement? your help is greatly appreciated.

Here is some of my code just in case it is useful

<div id="weather">
        <div id="title">
                <ul>
                    <!--<li> Outside Temp </li>-->
                    <li> Today </li>
                    <li> Tomorrow </li>

                </ul>
        </div> <!--title-->

        <div id="forecast">

        <div id="images">
            <ul>
                <?php foreach ($weather->get_forecasts() as $forecast): ?>

                <li><img src="<?php echo $forecast->get_image(); ?>" alt="Weather" /></li>

                <?php endforeach; ?>
            </ul>
         </div> <!--images-->

        <div id="degrees">
            <ul>
                <?php foreach ($weather->get_forecasts() as $forecast): ?>

                <li><?php echo $forecast->get_low(); ?>&deg; &nbsp; <?php echo $forecast->get_high(); ?>&deg; </li>

                <?php endforeach; ?>
            </ul>
            </div><!--degrees-->

    </div> <!--forecast-->
<!--</div> <!--second-->

Some header part info:

<php

require_once('simplepie/simplepie.inc');
require_once('simplepie/simplepie_yahoo_weather.inc');

$feed = new SimplePie();

$feed->set_feed_url('http://weather.yahooapis.com/forecastrss?w=1234567&u=c'); 

$feed->set_item_class('SimplePie_Item_YWeather');

$feed->init();

$weather = $feed->get_item(0);

?>

Thank you very much!

S:)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T11:42:11+00:00Added an answer on May 24, 2026 at 11:42 am

    Since you’re not already using JavaScript, a really simple way for you to periodically refresh the page might be to use the meta refresh tag. Although deprecated, it might be a quick way for you to get dynamic pages. Simply add the tag to the <head> of the page:

    <meta http-equiv="refresh" content="5"> <!--Refresh the page every 5 seconds-->
    

    However, you might want to consider using ajax to load your content into the page instead. This might not be the best possible approach to this but here’s some quick and dirty code.

    In the main page, you could use jQuery load to periodically hit the URL for your PHP script and load the content into a div for display:

    <html>
    <head>
        <script type="text/javascript">
            $(document).ready(function(){
                setTimeout(loadWeather, 5000); //using setTimeout instead of a setInterval to avoid having multiple queries queue up when the first one fails to return within the timeout period
            });
    
            function loadWeather(){
                $('#weather').load('weather.php);
                setTimeout(loadWeather, 5000);
            }
        </script>
    </head>
    <body>
        <div id="weather" />
    </body>
    </html>
    

    where weather.php might look something like this:

    <div id="weather">
            <div id="title">
                    <ul>
                        <!--<li> Outside Temp </li>-->
                        <li> Today </li>
                        <li> Tomorrow </li>
    
                    </ul>
            </div> <!--title-->
    
            <div id="forecast">
    
            <div id="images">
                <ul>
                    <?php foreach ($weather->get_forecasts() as $forecast): ?>
    
                    <li><img src="<?php echo $forecast->get_image(); ?>" alt="Weather" /></li>
    
                    <?php endforeach; ?>
                </ul>
             </div> <!--images-->
    
            <div id="degrees">
                <ul>
                    <?php foreach ($weather->get_forecasts() as $forecast): ?>
    
                    <li><?php echo $forecast->get_low(); ?>&deg; &nbsp; <?php echo $forecast->get_high(); ?>&deg; </li>
    
                    <?php endforeach; ?>
                </ul>
                </div><!--degrees-->
    
        </div> <!--forecast-->
    <!--</div> <!--second-->
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Yahoo! Weather RSS Feed in order to get the forecast for my
I am trying to read a weather feed from Yahoo to my site. Using
Currently I am using this code to pull a RSS feed from Yahoo Weather
After browsing through this site, I found that you can get Yahoo weather in
I'm using Yahoo's Minifier here: http://refresh-sf.com/yui/ I use it to compress CSS and Javascript.
Using google, yahoo and AOL smtp and PHPMailer how many mails can be sent
I get the Yahoo IP address using InetAddress class in java. The result of
I'm attempting to get order data from a Yahoo store. I'm using the docs
I tried to set the usergent using Inet1.Execute , GET, Referer: yahoo.com & vbCrLf
I'm using YAHOO.util.Connect.asyncRequest to get data from database, here is the code : function

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.