Welcome to Geeklog Saturday, September 21 2019 @ 11:26 am EDT

Geeklog Forums

shoutcast/icecast radio block

Status: offline


Forum User
Registered: 20/01/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?


Status: offline


Forum User
Full Member
Registered: 19/07/03
Posts: 200
Location:N. Ireland
If you post the code you're trying to use something may be able to fix it for you!

Status: offline


Forum User
Registered: 20/01/06
Posts: 44
Function phpblock_radio () {

// Fill in your own server information here:
$host = "";
$port = "8001";
$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"Wink; //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;


Status: offline


Forum User
Registered: 20/01/06
Posts: 44
Even though I am listening to the Radio, it states that the Radio is Offline..


You have to use curl to get server status, playlist etc. from Icecast servers.
This code has nothing to do...

Status: offline


Forum User
Full Member
Registered: 09/03/05
Posts: 242
not working Frown
**Cuando el Alumno esta listo, el Maestro Aparece ** ::Geeklog support in Spanish::



use this: http://shoutcast.sodah.de/#/House/6668/

PHP 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"/>
<embed src="http://shoutcast.sodah.de/shoutcast.swf?swfgenre=House&swfchannel=6668"
type="application/x-shockwave-flash"width="240" height="200"></embed></object>

All times are EDT. The time is now 11:26 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