Advertisement
Guest User

Untitled

a guest
Mar 16th, 2011
1,979
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.46 KB | None | 0 0
  1. <?php
  2.     $request =  'http://api.own3d.tv/liveCheck.php?live_id=';
  3.     $arg = '240';
  4.  
  5.     $session = curl_init($request.$arg);
  6.  
  7.     curl_setopt($session, CURLOPT_HEADER, false);
  8.     curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
  9.     $response = curl_exec($session);
  10.     curl_close($session);
  11.  
  12.     if (preg_match("/true/",$response, $result)) {
  13.         $streamStatus="on";
  14.     } else {
  15.         $streamStatus="off";
  16.     }
  17.    
  18.     echo $streamStatus;
  19.  
  20. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement