1. Go to this page and download the library: Download fhteam/selectel-storage-api 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/ */
fhteam / selectel-storage-api example snippets
$config = r = new Container($config['auth_container']);
$auth = new CredentialsAuthentication($config['auth_user'], $config['auth_key'], $config['auth_url']);
$auth->authenticate();
$file = new File('test.txt');
$file->setLocalName(__DIR__ . '/../data/config.php');
$file->setSize();
$service = new StorageService($auth);
$service->uploadFile($container, $file);
$file = new File('test.txt');
$service = new StorageService($auth);
$service->deleteFile($container, $file);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.