PHP code example of corbpie / streamable-dl

1. Go to this page and download the library: Download corbpie/streamable-dl 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/ */

    

corbpie / streamable-dl example snippets



Corbpie\StreamableDl\StreamableDL;

$url = "https://streamable.com/8mr65";//200 link

$save_as = "test.mp4";

$sdl = new StreamableDL($url, $save_as);

echo json_encode($sdl->downloadVideo());
json
[
  {
    "date_time": "2021-10-27 09:43:25",
    "task": "doCurl",
    "args": [
      "https:\/\/streamable.com\/8mr65"
    ],
    "http_code": 200
  },
  {
    "date_time": "2021-10-27 09:43:25",
    "task": "getVideoDirectLink",
    "link": "https:\/\/cdn-cf-east.streamable.com\/video\/mp4\/8mr65.mp4?Expires=1635546720&Signature=XYZABC123&Key-Pair-Id=ABC098"
  },
  {
    "date_time": "2021-10-27 09:43:36",
    "task": "saveVideoFile",
    "args": [],
    "result": 3610791
  },
  {
    "date_time": "2021-10-27 09:43:36",
    "task": "downloadVideo",
    "message": "Downloaded video",
    "saved_as": "test.mp4"
  }
]