Support » Plugins and Hacks » Refresh Widgets

Refresh Widgets

  • 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:

    //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')) {
                    echo "<br /><p><b>&nbsp&nbsp Stream Status:</b> $ice_status";
                    $stats = file("http://" . $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=http://" . $server . ":" . $iceport . "/" . $iceurl . " target=new><b>Listen!</b></a></p>";
             } else {
                    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: http://www.x86cam.com/

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