CraftifiedLIVE Posted February 1, 2012 Share Posted February 1, 2012 I don't know much about PhP at all and hoped to get some help here. I recently started a website for livestreaming games (www.lybotech.com) and got a script for own3d.tv to check wether a user is streaming or not but I do not know how to implement the code, I tried adding it in dreamweaver like html code but when I checked the page it didnt load anything. Here is the code : <?php $request = 'http://api.own3d.tv/liveCheck.php?live_id='; $arg = 'Zerkilive'; $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)) { $streamStatus="on"; } else { $streamStatus="off"; } echo $streamStatus; ?> Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted February 2, 2012 Share Posted February 2, 2012 When I execute it here, it echos "off". Quote Link to comment Share on other sites More sharing options...
CraftifiedLIVE Posted February 2, 2012 Author Share Posted February 2, 2012 I think I asked it a bit wrong, I was wondering how I can implement the code correctly into my website. As of now when I implement it as normal html code it displays nothing. Thanks for reply though Quote Link to comment Share on other sites More sharing options...
QuickOldCar Posted February 8, 2012 Share Posted February 8, 2012 This requires the id number and not the user name. As an example http://api.own3d.tv/liveCheck.php?live_id=13576 So change your $arg to whatever your id may happen to be. $arg = '13576'; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.