PHP code example of boldbrush / cloudflare-streams-php

1. Go to this page and download the library: Download boldbrush/cloudflare-streams-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/ */

    

boldbrush / cloudflare-streams-php example snippets




use BoldBrush\Cloudflare\API;

/** @var API\Enpoints\Streams */
$api = API\Factory::make(
    '<account>',
    '<apiKey>',
    '<email>'
);

/** @var API\Response\Stream[] */
$streams = $api->getStreams();

/** @var API\Response\Stream */
$stream = $api->getStream('<uid>');

/** @var API\Response\Stream */
$stream = $api->copy('<url>');

/** @var bool */
$success = $api->delete('<uid>');

/** @var string */
$html = $api->getEmbedSnippet('<uid>')
bash
$ composer