Status: offline


Forum User
Registered: 06/04/04
Posts: 6
I'm just wondering if anyone has had any success in creating a shoucast block displaying current and recently played songs. Heck... a static page for that matter. Been going batty trying to figure this one out.

Success stories? aka...

Status: offline


Forum User
Registered: 06/04/04
Posts: 6
Got it running in a static php enabled page with xml running on the back side. Now... I'm going to get this running in a block. Once complete... I'll be more than happy to post it.

Status: offline

varian vega

Forum User
Registered: 05/21/04
Posts: 10
Did you succeed? If yes, it would be nice if you could share the code! Thanx, varian



As of yet I haven't. I'm hoping to have it finished within the next 2 weeks. My wife gave birth to our new little girl so I've been kinda tied up!

Don't worry.... I WILL be posting the code once it's complete!

Status: offline


Forum User
Registered: 11/20/04
Posts: 2
Sounds great......congrats by the way.

I am looking forward to the release!

Status: offline


Forum User
Full Member
Registered: 01/21/02
Posts: 269
Probably not what you're looking for but...I created a php block for my Squeezebox here. Some of the code might be reusable for Shoutcast.

BTW, if you don't know what a Squeezebox is...check it out here.

In a world without walls and fences, who needs Windows and Gates?


Hello there
I'm new to geeklog, and kinda like the approach, simple to use, and have what i need..
I was wondering if u every found a solution for this answer, i'll be curiouis to know, since i'm also using shout cast, and SAM broadcaster,

would like to interface it with my new to come website



here is some code that i modified for use on my brothers website. i am not sure if this will work but give it a try

Text Formatted Code

Function phpblock_radio () {

// Fill in your own server information here:   
        $host = "";
        $port = "8000";
        $listenlink = '';  //make link to stream
        $fp = fsockopen("$host", $port, &$errno, &$errstr, 30); //open connection
        if(!$fp) {
                $success=2;  //se-t if no connection
        if($success!=2){ //if connection
                fputs($fp,"GET /7.html HTTP/1.0rnUser-Agent: XML Getter (Mozilla Compatible)rnrn"); //get 7.html
                while(!feof($fp)) {
                        $page .= fgets($fp, 1000);
                fclose($fp); //close connection
                $page = ereg_replace(".*<body>", "", $page); //extract data
                $page = ereg_replace("</body>.*", ",", $page); //extract data
                $numbers = explode(",",$page); //extract data
                $currentlisteners=$numbers[0]; //set variable
                $connected=$numbers[1]; //set variable

                if($connected==1) //if DSP is connected
                        $wordconnected="yes"; //set variable
                else //if no DSP connection
                        $wordconnected="no"; //set variable
                $peaklisteners=$numbers[2]; //set variable
                $maxlisteners=$numbers[3]; //set variable
                $reportedlisteners=$numbers[4]; //set variable

        if($success!=2 && $connected==1){

// song information is splitted in artist - title:
// This requires consistent artist & title format (no ' - ' in title/artist)
// else you can use $numbers[6] as current song info below
                $song=explode(" - ",$numbers[6]);
// strings can of course be replaced with your own bla
                $display .= "Now playing on Darkpit Radio<br>";
                $display .= "Artist: ". $song[0] . "<br>";
                $display .= "Song: ". $song[1] . "<br>";
                $display .= "[$currentlisteners/$maxlisteners users]"."<br> <a target='_new' href=' " . $listenlink ."'>[click to listen]</a> ";
        else {
                $display .= "Darkpit Radio is currently";
                $display .= "OFFLINE.";
                $display .= "Please return later.";
                $display .=":::";
          return $display;



this might work for you


I tried your php_block on my site, but not succesful..
Even though I am listening to the Radio, it states that the Radio is Offline..
Any ideas to what that could cause this?