| View previous topic :: View next topic |
| Author |
Message |
Anonymous Guest
|
Posted: Tue Aug 08, 2006 7:00 pm Post subject: Online status script |
|
|
OK, ive looked everywhere, wel not everywhere but ive looked on google and cant seem to find a script that works with my icecast, I want one that says if ther server is online adn that somebody is broadcasting or not so I can echo the php status to control a image!
Anyway im using a router and have forwarded the ports and people can see the http://myip:8000 page but none of the script I have seem to be able to return the status?
Any ideas im using the DI-524 Wireless Router and the latest verion of Icecast!
Thanks in advance
Chris |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Wed Aug 09, 2006 1:31 am Post subject: |
|
|
why not write your own xsl page that just reports whether a stream is offline or not
karl. |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Wed Aug 09, 2006 10:21 am Post subject: |
|
|
I dont have any knowledge is these file formats, I know basic php and thats about it, I was just looking for something that I could just enter my IP address and go!
Just out of interest I was using /live.m3u as my Mount, is this correct?
This is the address that people connect thro http://myipaddress:8000/live.m3u
Cheers
Chris |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Wed Aug 09, 2006 9:23 pm Post subject: |
|
|
Do you think that icecast only handles 1 stream. Of course it can be used with stream but we've tested with over 1000 streams.
You could copy/cut down the status.xsl file to present a list of streams that are currently running, you can then use you php to parse that request.
The mountpoint to specify in the relay/source client does not have a m3u extension as that is a playlist not a stream.
karl. |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Fri Aug 11, 2006 4:23 pm Post subject: on a single server... |
|
|
Well it sort of easy on a single server to get the status of that server..
just use http://{serveraddress}:{serverport}/
Note replace the server name and port with what you set it up to be....
if you have access on the local machine you could use http://127.0.0.1:8000
That asumes you useing the tandard ports. This will come up with and mounts that the server has available. and sign on the admin sectio nand you can see who is connected etc..
for a computer on the local network it would be the IP address on the local network..
You could not use you public IP because of how most routers work. THe best way to try it is to use a public http proxy server.. I would post an address for one here but they tend to come and go. just do a serach on goggle for "public http proxy servers" and you be able to find a free one to test if you router is set up to forward your server port.
abitar |
|
| Back to top |
|
 |
chas
Joined: 30 Jul 2006 Posts: 38
|
Posted: Sat Aug 12, 2006 12:30 pm Post subject: |
|
|
| what variable do u use to detect if the server is online?? |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Sat Aug 12, 2006 7:51 pm Post subject: |
|
|
Chas,
if the ICEcast Server is online your are able to connect and parse the stats.mxl file (PHP function: fsockopen)
If fsockopen ist not OK, Server is offline.
To check further if a stream is on air you can parse the stats.xml for "sources". If sources > 0, then server ist on air, otherwise no stream is active. (Note: This is only valid for live streams, having stream on demand and serving files, the source is still 0 and you can't see also any listeners IPs. )
Regards, Adam |
|
| Back to top |
|
 |
chas
Joined: 30 Jul 2006 Posts: 38
|
Posted: Sun Aug 13, 2006 9:25 am Post subject: |
|
|
Look i just need to display a ONLINE image when its online and OFFLINE image when its offline
IS it so hard to do ??  |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Sun Aug 13, 2006 9:38 am Post subject: |
|
|
1. You need to get the server or stream status
2. If ($status == 1) give html code for showing the online.gif else offline.gif
Doing it as a script (e. g. http://www.stream24.org/?lang=de&page=demostatus
you need to work with header("Location: /img/onair.jpg");
This is not an issue of ICEcast Server, just a little bit PHP-Programming
Regards, Adam |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Wed Aug 23, 2006 1:41 pm Post subject: |
|
|
I can send you the php code to do this.
www.galwayland.com |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Wed Aug 23, 2006 7:54 pm Post subject: |
|
|
this is what i search for
i use a similiar code for shoutcast:
javascript:popUp1('http://www.reggae-party.de/query.php')
kolja |
|
| Back to top |
|
 |
|