| View previous topic :: View next topic |
| Author |
Message |
Nanou
Joined: 24 Nov 2009 Posts: 30
|
Posted: Thu Nov 26, 2009 1:34 pm Post subject: Seeing what's playing on my web site |
|
|
Hi all, still learning....
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 !
 |
|
| Back to top |
|
 |
jcr Modérateur français

Joined: 14 Apr 2006 Posts: 544 Location: France, Auvergne
|
|
| Back to top |
|
 |
Nanou
Joined: 24 Nov 2009 Posts: 30
|
Posted: Thu Nov 26, 2009 5:55 pm Post subject: |
|
|
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 |
|
 |
jcr Modérateur français

Joined: 14 Apr 2006 Posts: 544 Location: France, Auvergne
|
Posted: Thu Nov 26, 2009 5:59 pm Post subject: |
|
|
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 |
|
 |
Nanou
Joined: 24 Nov 2009 Posts: 30
|
Posted: Thu Nov 26, 2009 6:09 pm Post subject: |
|
|
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  |
|
| Back to top |
|
 |
rec91402
Joined: 14 Nov 2009 Posts: 32
|
Posted: Fri Nov 27, 2009 1:34 pm Post subject: |
|
|
| 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  |
| 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 |
|
 |
jcr Modérateur français

Joined: 14 Apr 2006 Posts: 544 Location: France, Auvergne
|
Posted: Fri Nov 27, 2009 2:50 pm Post subject: |
|
|
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 |
|
 |
|
|
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
|