PHP code example of siyahmadde / yandex-disk-api

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

    

siyahmadde / yandex-disk-api example snippets


use Siyahmadde\Disk;

$disk = new Disk('Your Id');

$disk->getLoginToken();

Disk::handleCallback();

$disk->setToken('your_token');

$disk->setReturnDecoded();

$disk->aboutDisk();

$disk->uploadFile('your_file');

$disk->downloadOwnFile('file_path');

$disk->downloadOthersFile('url','whatever_you_want_to_name_it');

$disk->saveToDisk('url');