• Hello, I am currently designing a radio blog, and I found a plugin called IceStats.

    I modified the icestats-display.php file to be this:

    <?php
    //Display IceCast Server Stats
    
    	$server = get_option('icestats_server');
         	$iceport = get_option('icestats_port');
    	$iceurl = get_option('icestats_url');
            $online = "<font color=green><b>ONLINE</b> </font><br />";
            $offline = "<font color=red><b>OFFLINE</b></font><br />";
    
            if($fp = @fsockopen($server, $iceport, $errno, $errstr, '1')) {
                    fclose($fp);
                    $ice_status=$online;
                    echo "<br /><p><b>&nbsp&nbsp Stream Status:</b> $ice_status";
                    $stats = file("https://" . $server . ":" . $iceport . "/status2.xsl");
                    $status = explode(",", $stats[5]);
                    $artist = explode("-", $status[5]);
                    echo "<p>";
                    echo "<b>&nbsp&nbsp Artist:</b> " . $artist[0];
                    echo "<br />";
                    echo "<b>&nbsp&nbsp Song:</b> " . $artist[1];
                    echo "</p>";
    		echo "<hr />";
    		echo "<p>&nbsp&nbsp&nbsp <a href=https://" . $server . ":" . $iceport . "/" . $iceurl . " target=new><b>Listen!</b></a></p>";
    
             } else {
    
                    $ice_status=$offline;
                    echo "<p><b>Stream Status:</b> $ice_status";
            }
    
    ?>

    I want it to refresh the radio stats INSIDE the Widget, so that it doesn’t bother the user.

    I did some searches on google, and the only thing I could find was

    <?php header('Refresh: 20');
    ?>

    I tried, but it kept refreshing the PAGE. I want it to refresh the widget.

    Here is my website for you to see: https://www.x86cam.com/

  • The topic ‘Refresh Widgets’ is closed to new replies.