Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Seeing what's playing on my web site

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server
View previous topic :: View next topic  
Author Message
Nanou



Joined: 24 Nov 2009
Posts: 30

PostPosted: Thu Nov 26, 2009 1:34 pm    Post subject: Seeing what's playing on my web site Reply with quote

Hi all, still learning.... Wink

I want to display what I am playing on my website in real time. Is this possible ? and if yes, can you help me on this please ?

Maybe displaying the title of the song playing...

Thanks !

Smile
Back to top
View user's profile Send private message
jcr
Modérateur français
Modérateur français


Joined: 14 Apr 2006
Posts: 544
Location: France, Auvergne

PostPosted: Thu Nov 26, 2009 5:47 pm    Post subject: Reply with quote

as a starter for your site display, have a look to http://yoursite:8000/status2.xsl

This sends a simple text file you can parse trough PHP and display as you like.
_________________
Epsilon Friends Radio Icecast Radio on CentovaCast admin panel. Icecast hosting
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Nanou



Joined: 24 Nov 2009
Posts: 30

PostPosted: Thu Nov 26, 2009 5:55 pm    Post subject: Reply with quote

yes I know that I am suppose to do that but how to do it ????

I want to display, on a HTML file, the status of my radio.

Ex:

Now playing : blabla.mp3
Artist: balbalbalbal

I don't know How to do this. Everywhere, in this forum, everybody talks about xsl file and xsl file and again xsl file but no one (that I did not find yet ) tells us HOW to do this.

Thanks.
Back to top
View user's profile Send private message
jcr
Modérateur français
Modérateur français


Joined: 14 Apr 2006
Posts: 544
Location: France, Auvergne

PostPosted: Thu Nov 26, 2009 5:59 pm    Post subject: Reply with quote

With simple html, there's no way, you'll need some PHP to parse the result.
_________________
Epsilon Friends Radio Icecast Radio on CentovaCast admin panel. Icecast hosting
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Nanou



Joined: 24 Nov 2009
Posts: 30

PostPosted: Thu Nov 26, 2009 6:09 pm    Post subject: Reply with quote

Okay so....do you have an example of php calling the status so that I could "see" how it is done ?

Once I see it, i will know...

Thanks Smile
Back to top
View user's profile Send private message
rec91402



Joined: 14 Nov 2009
Posts: 32

PostPosted: Fri Nov 27, 2009 1:34 pm    Post subject: Reply with quote

Nanou wrote:
Okay so....do you have an example of php calling the status so that I could "see" how it is done ?

Once I see it, i will know...

Thanks Smile


Code:


<?

$handle = file("http://YOUR IP GOES HERE:8000/status2.xsl");

var_dump ($handle);

?>

Output:

array(6) { [0]=> string(39) "" [1]=> string(109) " " [2]=> string(6) "
"
  [3]=>
  string(95) "MountPoint,Connections,Stream Name,Current Listeners,Description,Currently Playing,Stream URL
"
  [4]=>
  string(33) "Global,Client:1424 Source: ,,2,,
"
  [5]=>
  string(77) "/PolkCountyFL.ogg,,,0,, - ,/WashCoDPS,,,2,, - ,/manateeedacs,,,0,, - ,
 " }


This is something quick.

It reads the stats file into an array that you can parse out the parts you want.

You could read the file/URL in via a couple of ways, this is just one quick example.

The var_dump just shows you whats in the array. You can parse out the parts you want into "pretty" HTML or other formats.
Back to top
View user's profile Send private message
jcr
Modérateur français
Modérateur français


Joined: 14 Apr 2006
Posts: 544
Location: France, Auvergne

PostPosted: Fri Nov 27, 2009 2:50 pm    Post subject: Reply with quote

using file is a way, sure. However, I recomand using fsockopen instead, as file with distant open is often blocked by european (specialy french) hostings, for security reasons.
_________________
Epsilon Friends Radio Icecast Radio on CentovaCast admin panel. Icecast hosting
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber