PHP code example of stable-cz / cdn-client

1. Go to this page and download the library: Download stable-cz/cdn-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/ */

    

stable-cz / cdn-client example snippets


 // construct
 $client = new \Stable\Cdn\Client(YOUR_API_KEY);
 
 // create some local file
 file_put_contents('localfile', date('Y-m-d'));
 
 // upload file
 $client->upload('localfile', 'path/to/remotefile');
 
 // verify file exists
 $client->ls('path/to/remotefile');
 
 // list files in directory
 $client->ls('path/to');
 
 // delete remote file
 $client->delete('path/to/remotefile');