Welcome to Geeklog, Anonymous Friday, November 22 2024 @ 01:02 am EST
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...
Success stories? aka...
42
16
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
19
19
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!
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!
16
13
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!
I am looking forward to the release!
20
19
Quote
Status: offline
squatty
Forum User
Full Member
Registered: 01/21/02
Posts: 269
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
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
20
24
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
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
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
23
25
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?
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?
20
16
Quote
All times are EST. The time is now 01:02 am.
- 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