$http_status_array = $wdc->lock($new_target_folder); print 'webdav server returns ' . $http_status_array['status'] . '<br>'; print 'locktocken is ' . $http_status_array[0]['locktoken'] . '<br>'; print 'Owner of lock is ' . $http_status_array[0]['owner'] . '<br>'; // --- print 'Let\'s unlock this collection with a wrong locktoken<br>'; $http_status = $wdc->unlock($new_target_folder, 'wrongtoken'); print "webdav server returns {$http_status}<br>"; print 'Let\'s unlock this collection with the right locktoken<br>'; $http_status = $wdc->unlock($new_target_folder, $http_status_array[0]['locktoken']); print 'webdav server returns ' . $http_status . '<br>'; // -- print 'Let\'s remove/delete the moved collection ' . $new_target_folder . '<br>'; $http_status_array = $wdc->delete($new_target_folder); print 'webdav server returns ' . $http_status_array['status'] . '<br>'; // -- print 'Publishes the file to Yandeks.Disk...<br>'; $target_path = $test_folder . '/picture.jpg'; $http_status = $wdc->public_file($target_path); print 'Link to a file on Yandex.Disk ' . $http_status . '<br>'; // -- print 'Closes access to the link to the file in Yandeks.Disk...<br>'; $target_path = $test_folder . '/picture.jpg'; $http_status = $wdc->public_file($target_path); print 'return false or true: ' . $http_status . '<br>'; $wdc->close(); flush(); ?> </body> <html>