Welcome to Geeklog, Anonymous Thursday, March 28 2024 @ 06:25 pm EDT

Geeklog Forums

Shoutcast Block?


Status: offline

Kutulu

Forum User
Newbie
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...
 Quote

Status: offline

Kutulu

Forum User
Newbie
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.
 Quote

Status: offline

varian vega

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

Kutulu

Anonymous
VV,

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!
 Quote

Status: offline

Faust-Eternal

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

I am looking forward to the release! Cool
 Quote

Status: offline

squatty

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?
 Quote

reggierich

Anonymous
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

regards
 Quote

Trinity

Anonymous
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 = "darkpitradio.elitepalaces.com";
        $port = "8000";
        $listenlink = 'http://darkpitradio.elitepalaces.com:8000/listen.pls';  //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
 Quote

Lasse

Anonymous
@Trinity
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?
 Quote

All times are EDT. The time is now 06:25 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content