Welcome to Geeklog, Anonymous Wednesday, July 16 2025 @ 04:37 am EDT
Geeklog Forums
shoutcast/icecast radio block
Status: offline
Forum User
Chatty
Registered: 01/20/06
Posts: 44
we started to broadcast a web radio on our website www.mulksuzler.net
but i need a block to listen on the any page on my site
i found a code and tried but it dosnt work
is there any idea?
thanks
but i need a block to listen on the any page on my site
i found a code and tried but it dosnt work
is there any idea?
thanks
27
26
Quote
Status: offline
Forum User
Full Member
Registered: 07/19/03
Posts: 200
If you post the code you're trying to use something may be able to fix it for you!
22
16
Quote
Status: offline
Forum User
Chatty
Registered: 01/20/06
Posts: 44
Function phpblock_radio () {
// Fill in your own server information here:
$host = "89.149.217.39";
$port = "8001";
$listenlink = 'http://89.149.217.39:8001/mulksuz.m3u'; //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 .= "Mulksuzler Radyo dinlemektesiniz<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 .= "Mulksuzler Radyoda simdi";
$display .= "Yayin Yok.";
$display .= "Sonra gene deneyin.";
$display .=":::";
}
return $display;
}
// Fill in your own server information here:
$host = "89.149.217.39";
$port = "8001";
$listenlink = 'http://89.149.217.39:8001/mulksuz.m3u'; //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"

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 .= "Mulksuzler Radyo dinlemektesiniz<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 .= "Mulksuzler Radyoda simdi";
$display .= "Yayin Yok.";
$display .= "Sonra gene deneyin.";
$display .=":::";
}
return $display;
}
18
21
Quote
Status: offline
Forum User
Chatty
Registered: 01/20/06
Posts: 44
Even though I am listening to the Radio, it states that the Radio is Offline..
29
22
Quote
You have to use curl to get server status, playlist etc. from Icecast servers.
This code has nothing to do...
This code has nothing to do...
26
26
Quote
Status: offline
Forum User
Full Member
Registered: 03/09/05
Posts: 242
not working

27
27
Quote
Hi,
use this: http://shoutcast.sodah.de/#/House/6668/
<param name="movie" value="http://shoutcast.sodah.de/shoutcast.swf?swfgenre=House&swfchannel=6668"/>
</param>
<embed src="http://shoutcast.sodah.de/shoutcast.swf?swfgenre=House&swfchannel=6668"
type="application/x-shockwave-flash"width="240" height="200"></embed></object>
use this: http://shoutcast.sodah.de/#/House/6668/
Text Formatted Code
<object width="240" height="200" type="application/x-shockwave-flash"><param name="movie" value="http://shoutcast.sodah.de/shoutcast.swf?swfgenre=House&swfchannel=6668"/>
</param>
<embed src="http://shoutcast.sodah.de/shoutcast.swf?swfgenre=House&swfchannel=6668"
type="application/x-shockwave-flash"width="240" height="200"></embed></object>
25
25
Quote
All times are EDT. The time is now 04:37 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