1. Go to this page and download the library: Download vectorly/php-client 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/ */
/**
* Upload the file
* With a custom name (optional),
* Set the unique id (optional),
* And upload a chunk of 1MB (optional)
*/
$bytes_uploaded = $client->upload( '/path/to/file', 'my_custom_name.mp4', 'my_unique_id', 1000000 );
echo $bytes_uploaded;
/**
* Get a temporary url that grants access to the video for ten minutes
* If the duration is omitted, the default value is one minute
*/
$temporary_url = $client->secure('video_id', 10);
print_r($temporary_url);
bash
composer
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.