1. Go to this page and download the library: Download mathsgod/pcloud-sdk-php 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/ */
$api->deletefile(123456789);
// or
$api->deletefile(null, '/Documents/test.pdf');
// By folderid+name
$meta = $api->createfolder(null, 123456, 'New Folder');
// By full path
$meta = $api->createfolder('/Documents/New Folder');
$list = $api->listfolder(null, 123456); // By folderid
$list = $api->listfolder('/Documents'); // By path
$api->deletefolderrecursive(123456); // Deletes all contents, use with caution
// Copy to another folder
$api->copyfolder(123456, null, 654321);
// Copy to a specific path
$api->copyfolder(123456, null, null, '/Documents/Backup/');
// Copy file to new folder
$api->copyfile(123, null, 456, null, 'newname.jpg');
// Move and rename
$api->renamefile(123, null, null, 456, 'newname.jpg');