PHP code example of leavebn / duanship

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

    

leavebn / duanship example snippets


use Leavebn\Duanship\DuanAPI;

$dapi = new DuanAPI([
    "secretId"  => "填入你的secretId", 
    "secretKey" => "填入你的secretKey",
    "preParse"  => false // 是否需要返回更多信息,如视频尺寸和格式
]);

echo json_encode(
    $dapi->parse("https://h5.pipix.com/s/JajGA65/")
, JSON_UNESCAPED_UNICODE);