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 

Online status script

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





PostPosted: Tue Aug 08, 2006 7:00 pm    Post subject: Online status script Reply with quote

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
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Wed Aug 09, 2006 1:31 am    Post subject: Reply with quote

why not write your own xsl page that just reports whether a stream is offline or not

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Anonymous
Guest





PostPosted: Wed Aug 09, 2006 10:21 am    Post subject: Reply with quote

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
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Wed Aug 09, 2006 9:23 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Anonymous
Guest





PostPosted: Fri Aug 11, 2006 4:23 pm    Post subject: on a single server... Reply with quote

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

PostPosted: Sat Aug 12, 2006 12:30 pm    Post subject: Reply with quote

what variable do u use to detect if the server is online??
Back to top
View user's profile Send private message
Anonymous
Guest





PostPosted: Sat Aug 12, 2006 7:51 pm    Post subject: Reply with quote

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

PostPosted: Sun Aug 13, 2006 9:25 am    Post subject: Reply with quote

Look i just need to display a ONLINE image when its online and OFFLINE image when its offline Very Happy

IS it so hard to do ?? Very Happy
Back to top
View user's profile Send private message
Anonymous
Guest





PostPosted: Sun Aug 13, 2006 9:38 am    Post subject: Reply with quote

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 Smile

Regards, Adam
Back to top
Anonymous
Guest





PostPosted: Wed Aug 23, 2006 1:41 pm    Post subject: Reply with quote

I can send you the php code to do this.


www.galwayland.com
Back to top
Anonymous
Guest





PostPosted: Wed Aug 23, 2006 7:54 pm    Post subject: Reply with quote

wgalway wrote:
I can send you the php code to do this.


www.galwayland.com


this is what i search for Smile

i use a similiar code for shoutcast:

javascript:popUp1('http://www.reggae-party.de/query.php')

kolja
Back to top
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