PHP code example of otoyinc / xio-php

1. Go to this page and download the library: Download otoyinc/xio-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

otoyinc / xio-php example snippets


$xio = new Services_XIO('R45KU9BJWTKM4ATGZNKF29LJZ', 'F2kiGEZuhv7D7AEujAiwgLKVjZjP28pa0P96pbiw');

$xio->streams->create($array);
$xio->streams->details($stream_id);
$xio->streams->cancel($stream_id);



// Make sure this points to a copy of XIO.php on the same server as this script.
('R45KU9BJWTKM4ATGZNKF29LJZ', 'F2kiGEZuhv7D7AEujAiwgLKVjZjP28pa0P96pbiw');

  // New Encoding Job
  $stream = $xio->streams->create(
    array(
      "application_id" => "7cd9272c77ef44aeb460a70de434067a",
      "version_id" => "980a84ff564b4c459cc5a658fd3fa838"
    )
  );

  // Success if we got here
  echo "w00t! \n\n";
  echo "Stream ID: ".$stream->id."\n";
  echo "Application name: ".$stream->application->name."\n";
} catch (Services_XIO_Exception $e) {
  // If were here, an error occured
  echo "Fail :(\n\n";
  echo "Errors:\n";
  echo $e->getErrors()->error."\n\n";
  echo "Full exception dump:\n\n";
  print_r($e);
}

echo "\nAll Stream Attributes:\n";
var_dump($stream);