Skip to main content
October 11, 2008
Question

Check if a stream is live via PHP?

  • October 11, 2008
  • 3 replies
  • 1690 views
Hi all!

Is there any way to check if a certain RTMP stream is live, via PHP?

The homepage of my site (which is built with PHP) will change depending on what streams are live (there are multiple streams). It's not enough to be able to check in a swf file as I can't then use the information to change the homepage or do other cool stuff like add to an RSS feed, or notify people via SMS/IM.

Is there any way to check this?

Thanks!
    This topic has been closed for replies.

    3 replies

    October 12, 2008
    Thanks, I'll see if I can try that!
    October 12, 2008
    Unfortunately, the applications running on the FMS Vhost (the FMS Core) can't listen for anything other than RTMP requests, so it means that your FMs app has to make the request.

    What you might want to try is building a little socket server in PHP, and program your FMS application connect to it when it starts up. That way, you can keep a stateful connection between PHP and the FMS app instance, and PHP can make requests over the socket.
    October 11, 2008
    Sure. You can use the HTTP API of the admin service to retrieve a list of live streams.

    http://www.adobe.com/livedocs/flashmediaserver/3.0/hpdocs/help.html?content=Book_Part_34_ss_asd_1.html
    October 11, 2008
    Aww, I'm using a 3rd party CDN. It says it's FMS 3 but I don't get access to any admin console. I was hoping there was a way of checking via other means using something like curl or similar by directly "asking" a known stream name.