Welcome to Geeklog, Anonymous Friday, March 29 2024 @ 07:17 am EDT

Geeklog Forums

shoutcast/icecast radio block


Status: offline

nobese

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
 Quote

Status: offline

Dazzy

Forum User
Full Member
Registered: 07/19/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!
Dazzy
 Quote

Status: offline

nobese

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"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;

}
 Quote

Status: offline

nobese

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

Kunthar

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

 Quote

Status: offline

koalasoft

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

Sodah

Anonymous
Hi,

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>


 Quote

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