Script to check if a Justin.tv stream is live.

I help run a website called SaskGamers.com, a few of the users on this site stream their in-game view over the internet for others to see. I tried to mimic teamliquid.net’s Live User Stream pane. At first I wrote this in JavaScript, but then I realized that essentially what I was did was a cross-site scripting attack, scrapped that and wrote it in PHP.

Here is the gist:

 

kylesmyth

 
  • Austin Wright

    Awesome. Saved my some headaches. Works great. Thanks so much! :-)

    • Marius

      gj…was easy to refactoring for other streams too…thx for template

    • Marius

      gj…was easy to refactoring for other streams too…thx for template

  • WSC2

    The script works great, but its taking very long to load.

    Any solutions would be appreciated.

    Thanks

    • WSC2

      Is there a possible way we can make it to only check 5-10minutes or so?

  • eDawg

    You are a super pimp, bro. thx so much for the straightforward script. Sifting through Justin.tv’s api wiki for this simple thing is like swimming through cement. 😉 Cheers. 

  • http://newerthguide.blogspot.com/ Nathaniel Alzaga

    i was trying to imitate this page: http://honmatch.com/streams do you think this is pretty easy to do?

  • http://www.dota2hook.de Dota2hook

    thanks bro! I will try to implement it on my site for streams: http://www.dota2hook.de/streams
    will tell if it worked or not, as soon as i am home!

  • Paradox

    This looks pretty cool, but I need something simpler. I was wondering if there was a way to get it to display a simple image based on one streams status.