Jump to content

Own3D Online / Offline indicator


CraftifiedLIVE

Recommended Posts

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;

 

?>

Link to comment
https://forums.phpfreaks.com/topic/256212-own3d-online-offline-indicator/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.