Jump to content


  • Posts

  • Joined

  • Last visited

Community Answers

  1. Texan78's post in PHP Fatal error: Call to a member function query() on a non-object was marked as the answer   
    They are EXACTLY the same line numbers. I copy and pasted them into a notepad to save for later then commented out the DB connection to stop it from making connections. 
    /* Lets connect to the database */ //include('dbconn.php'); Has zero to do with the error as I still get the SAME error regardless if it is commented out or not. So ignore it even exists. Had I not posted that part at all then I am sure I would be getting completely different responses. 
    No worries, thanks for the help. Its apparent no one is looking BEYOND what I am saying and only focusing on that being commented out instead of listening to what I am saying that it doesn't matter. I get the same error regardless even with waiting a couple hours which is plenty of time for the varnish cache to clear. 
  2. Texan78's post in Make HTTP GET request with cURL from Wowza Rest API was marked as the answer   
    Here is the final result. Thanks to everyone who contributed their time and skills in helping me with this in my learning process. Now on to trying to take these variables to update the DB. If there is no further objections or suggestions here is the final code. 
    $headers[] = 'Connection: Keep-Alive'; $headers[] = 'Content-Type: application/json;charset=utf-8'; $headers[] = 'Accept: application/json'; $userAgent = 'php'; $url = 'http://domain.com:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/instances/_definst_/incomingstreams/ncopeland'; $cURL = curl_init(); curl_setopt($cURL, CURLOPT_URL, $url); curl_setopt($cURL, CURLOPT_HTTPHEADER, $headers); curl_setopt($cURL, CURLOPT_USERAGENT, $useragent); curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true); curl_setopt($cURL, CURLOPT_HTTPGET, true); $result = curl_exec($cURL); curl_close($cURL); // Lets get and parse the data and create the variables $obj = json_decode($result); $chaser = $obj->name; $streamStatus = $obj->isConnected?'true':'false';
  • 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.