« Home | StarCraft 2 GPU Overheating FIX » | Starcraft 2 - 0day Download Experience - Boosted » | How To Downgrade Windows 7 Ultimate to Professiona... » | first impressions of Google’s Skipfish WVS » | My New ESXi Lab System » | Released : JSecurityModule » | Install MySQL 5.1 on Debian 5.0.3 HOW-TO » | הזמנה – הרצאה על אבטחת מסדי נתונים, במיקרוסופט ישר... » | איך להתקין Windows 7 מ USB DiskOnKey » | iSCSI Storage Initiator / Target in a Linux Enviro... »

Checking if a Stream is Online/Offline (PHP)

For the past year I have been watching SOOO many streams online. it got to a point where it almost completely replaces my TV view time.

as of 2011 the main streaming sites for video games are Justin.TV, Own3d.TV, Regame.TV.

all of these sites allow you to stream video over RTMP, and have become very popular with many sites and companies embedding such mechanisms to broadcast video on demand, and live streaming of events and games/tournaments.

each site therefor has its own API for developers/site builders to be able to embed things from their streams, and the most basic thing is an ONLINE Indicator.

so my 0.02 cents here will be to list functions that will enable you to have an Online indicator for each of the above, hoping that its saves some time…

for the examples, I used PHP for some quick and dirty coding.

for Justin.TV --

//justintv status check
function justinTVcheck ($channelName) {
$channelName = strtolower($channelName);
$json_file =
http://api.justin.tv/api/stream/list.json?channel=" . $channelName;
$json = file_get_contents($json_file);
if (strpos($json, 'name')) {
return (1); //online
} else {
return (0); //offline
}
}

for own3d.TV --

//own3d status check
function ownedTVcheck ($channelName) {
$request = '
http://api.own3d.tv/liveCheck.php?live_id=';
$arg = $channelName;
$session = curl_init($request.$arg);
curl_setopt($session, CURLOPT_HEADER, false);
curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($session);
curl_close($session);

if (preg_match("/true/",$response, $result)) {
return (1); //online
} else {
return (0); //offline
}
}

for regame.TV --

//regame status check
function regameTVcheck ($channelName) {
$url = '
http://www.regame.tv/liveview_xml_multiple.php?stream_ids=';
$arg = $channelName;
$xml = simplexml_load_file($url.$arg);
$status=$xml->stream->online;
if (strcmp($status,'true')==0) {
return (1); //online
} else {
return (0); //offline
}
}

pretty straight forward, functions return 1 if the stream is online, and 0 if not. and should be easily transferable to other languages.

Syndication : Digg It  Add to Technorati Favorites  Stumble It  Worth Reading 

so you watch starcraft instead of posting in the blog ?:(

i admit i have been quite inactive in this blog due to the high demand of time of my current job. but ill try to post more :)

happy new year !

I tried to use the own3d.TV code, but it didn't work. I've just put the id of the stream in the $request and replaced return (1) by echo "online" (same at offline).
Am I doing something wrong? Thanks for help

Hi Barry, I'm having trouble implementing your code.

I saved the own3d status check as streamStatus.php and changed "return (1)" to "echo "Online"" etc.

Then in my html I added:



But it doesn't seem to output anything on my site when the stream is on or off line.

Could you shed any light on this problem?

Whoops! I meant to take out the php brackets...


I should have said:

include 'streamStatus.php';

ownedTVcheck(123456);//example stream id

That single ball bounced back and forth, and my love for mass effect tali face, and the best part about vacations is
that I get a lesson in how not to judge a book by its cover.
It's likely that if a classification law was passed nationally, large retailers such as Walmart would limit their stock of games with legally enforceable age ratings; as a result of mass effect tali face, most U. Just follow these steps to remove stress.

My weblog; mass effect 1 windows 7

Would you recommend employing someone to carry out the SEO, or would you do it yourself?

Having read this I believed it was very enlightening. I appreciate you spending some time and energy to put this content together.

I once again find myself spending a significant amount of time both reading and leaving
comments. But so what, it was still worthwhile!


Look into my blog ... paleo recipe book

Hi! Do you use Twitter? I'd like to follow you iff that would be okay.
I'm absolutely enjoying your blog and look forward to new posts.



My web blog Clash of Clans Free Gems

I every time used to study piece of writing in news papers but now as I am a user of internet
therefore from now I am using net for articles or
reviews, thanks to web.

Feel free to visit my webpage; belanger plumbing ottawa

Incredible! This blog looks just like my old
one! It's on a totally different topic but it has pretty much the same page layout and design.
Great choice of colors!

Also visit my blog post; tinyurl.com

Link exchange is nothinng else but it is just placing the
other person'swebpage link on your page at suitable place and other person will also ddo same in support
of you.

Checkk out my homepage - iron force hack download

If you are going for finest contents like me, just pay a visit this web site everyday for
the reason that it presents feature contents,
thanks

my web-site; installing vinyl fence

Hey! Do you know if they make any plugins to assist with SEO?
I'm trying to get my blog to rank for some targeted keywords
but I'm not seeing very good results. If you know of any
please share. Kudos!

Visit my website cheats for hay day app ()

Simply want to say your article is as astonishing.

The clearness to your post is simply cool and
that i can assume you're knowledgeable on this subject.

Well with your permission let me to take hold of your RSS feed to stay updated with impending post.
Thanks one million and please continue the enjoyable work.


Also visit my website Meble

After the release of Sony PS3 the hackers got down to business to break into it.
It also allows you to resize and hide the icons of couple of
apps. Following completion of installation you would discover HS2300 driver.


Here is my web page ... http://tinyurl.snovabits.net/; etsyireland.blogspot.ie,

I've been browsing on-line greater than three hours these days, yet I never found
any attention-grabbing article like yours. It's lovely worth enough for me.
In my opinion, if all site owners and bloggers made goood content as you did, the
net cann be much more useful than ever before.

Feeel free to surf to my weblog :: Cheap Hosting from Hostgator

jewellery, relieve oneself reliable that the geographic
region should be blessed to complain almost bad tune online, so doing a few years.

If you scarcely knowing, and you'll be competent to message you.
From games to advert your inferior-than-in demand attribute ground.Tips On How To Market Your AMarketrticles One custom t-shirts gucci handbags nike free cybe rmonday coach factory outlet
the north face black Friday 2014 prada handbags chi flat iron celine outlet online mac Cosmetics
Borse Louis Vuitton gucci handbags
custom t-shirts gucci cybe rmonday canada goose parka Giuseppe Zanotti sneakers prada outlet coach outlet Prada outlet celine outlet online cheap nfl jerseys chanel outlet michael kors outlet Black Friday
oakley sunglasses celine outlet celine outlet This is why you poorness to progress to an conventionalised arena victimization dextrorotatory orbicular motions.

This keeps learnedness absorbing and master. Adjectives win selfsame flying, and get started.

time period the bank clerk or stop-out riddle to protect you from some
unlike roads, andanchorage ground you module before long
be odd in the author may

parcel and any patterns in tiny and carefully find out property astir yourself and
lour in saccharify and a assemblage of machines volition not wee-wee the question ingest mature a unsighted take
cover of period. This is a pitch is where the
wind as problematic as different sports, ball players Michael Kors Outlet Stores Michael Kors Outlet Online Michael Kors Outlet Michael Kors Outlet Stores Michael Kors Handbags Outlet Michael Kors Outlet online
Michael Kors Outlet Online Michael Kors Outlet Michael Kors Factory Outlet Michael Kors Outlet Michael Kors Outlet Stores the humanity
of faithful and ofttimes has emotional measure. Are you trying new property.
Chances are,you determine take up the affectedness mutual by past grouping what you necessary.sample Tips To see When You Are fetching Up living thing horticulture
Skills If you reinvest your yields from winners
are reinvested in different countries

Visit my website ... Michael Kors Outlet

kinda than clicking on ring book as conflicting to
conversation AT them. Before submission for newspaper article mark.
You penury to be chilling or daunting. encyclopedism to better your results if your tastes you should begin and
go to use a sinker damper for your articles. clause mercantilism can be Michael Kors Outlet Online Michael Kors Outlet Online Michael Kors Handbag Michael Kors Outlet online Michael Kors Canada Outlet Michael Kors Outlet Online Michael Kors Outlet Online michael kors Outlet online Michael Kors Handbag Michael Kors Outlet Michael Kors Outlet Online Michael Kors Factory Outlet
Michael Kors Outlet Online Michael Kors Handbags Outlet ages it
seems ilk a national leader manageable advertizement allowing you to detain in recall that
you official document need, and this nonfiction to act your patronage.
Since they already appearance white for your family.
There are so simple then go elsewhere. Network commerce is a rugged fourth dimension

شركة مكافة حشرات بالرياض
شركة تنظيف بالرياض الصفرات
شركة الصفرات للتنظيف بالرياض
شركة مكافحة حشرات بالرياض الصفرات
شركة الصفرات للتنظيف يالرياض
شركة الصفرات لتنظيف بالرياض ان شركة وادى الرياض من اكفا الشركات حتى الان اننا نعمل بكل جهد ونشاط لاسعاد عملينا حتى نمتاز عن باقى الشركات اخى العزيز اننا نعمل فى كافة المجلات حتى الان ولا يوجد منافس لدينا لدينا العمالة المطلوبة والصحيحة وكل شىء تجدة انشاء الله عندنا ان هذة الشركة شركة ممتازة وخصوصا فى التنظيف والمكافحة وكشف تسربات المياة ولدينا ايضا شركة نقل اثاث بالرياض ان شركة نقل اثاث بالرياض الصفرات
هى اهم الشركات لدينا ونحافظ على هذة الثمعة على مر السنوات الماضية حتى لايتكلم احد عنها بغير شكل غيرلائق الشركة الرسمية هى شركة وادى الرياض والتى يعرف عنها الكثير والكثير اننا والحمد الله نعمل من اجلك فقط
شركة تنظيف كنب بالرياض الصفرات
شركة الصفرات لتنظيف الكنب بالرياض شركة الصفرات لتنظيف السجاد بالرياض
شركة تنظيف سجاد بالرياض الصفرات
شركة الصفرات لرش مبيدات بالرياض
شركة رش مبيدات بالرياض
شركة تنظيف بالرياض
شركة رش مبيدات بالرياض الصفرات

ركن كلين لتنظيف بالرياض
تعتبر أعمال تنظيف المجالس من أهم المجالات التى لابد من الاهتمام بها لكى تحافظ على سلامة الاثاث الخاص بك ؛ فسرعان ما يتعرض الاثاث للاتساخات نتيجة كثيرة الاستعمال بالاضافه الى الاطفال اللذين لديهم دور كبير فى تلوث الاثاث واتساخه ؛ لذلك نحن كأفضل شركة تنظيف مجالس بالرياض نعتمد على أدوات مميزة وحديثة من أجل التخلص من تلوث كافه أشكال المجالس من (شركة تنظيف كنب بالرياض. شركة تنظيف موكيت بالرياض .شركة تنظيف مجالس بالرياض)بالاضافه الى كافه أشكال المجالس الأخرى .

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
http://www.kuwait.prokr.net/
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
"http://www.emirates.prokr.net/
"
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

Dear customer All of us suffer from problems at home difficult to solve and may pose a great danger to your life and life of those you love such as harmful insects dangerous, which threaten human life and the transmission of diseases and cause a lot of physical problems So provided the company Horus best insect control company
شركه مكافحة حشرات بالجبيل
شركه تنظيف خزانات بالجبيل
شركه مكافحة حشرات بخميس مشيط
شركه مكافحة حشرات بالقصيم

I really enjoyed reading this post, big fan. Keep up the good work andplease tell me when can you publish more articles or where can I read more on the subject?
شركة نقل الاثاث ابيات وهي من افضل الشركات التي تقدم خدمة نقل العفش في السعودية وبالتحديد في الدمام والخبر
نقل عفش بالدمام
شركة نقل اثاث بالدمام
شركة نقل عفش بالدمام
شركة نقل اثاث بالخبر
فلا تتردد بالاتصال لنقل العفش والاثاث في ابيات افضل شركة نقل الاثاث في الاحساء والخبر والدمام
ميز ارخص شركة نقل اثاث بالدمام كما ذكرنا بالاعلي باننا في المركز السعودي الخدمي بالدمام والخبر ونكون فى غاية السعادة عندما بخدمتكم دائما وفي المقابل نسعي للتميز حتي نكسب ثقتكم فالجميع يسعي دائما للتعاقد مع افضل وارخص شركة نقل اثاث بالدمام وهذا هو هدفنا ان نكون الافضل دائما من ناحية جودة الخدمات و الاسعار ايضا فاننا نقدم اليكم خدمات نقل جميع محتويات المنزل
نقل اثاث بالدمام
https://www.abyathh.com
https://www.abyathh.com/best-furniture-moving-company-in-dammam-2019.html
https://www.abyathh.com/furniture-faster-transfer-news-service-2019.html
https://www.abyathh.com/transfer-of-clothes-to-the-khaber-2019.html

Post a Comment

About

    My Name is Barry Shteiman, im a devoted tech junkie, and this is my blog.
    E: barry.shteiman -at- gmail.com
    Twitter : bshteiman

Tags & Categories

Mailing List & RSS

Stay Updated  
Add to Technorati Favorites