PHP code example of silinternational / crashplan-php-client

1. Go to this page and download the library: Download silinternational/crashplan-php-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/ */

    

silinternational / crashplan-php-client example snippets





use Crashplan\Client;

$client = new Client([
  'apiuser' => 'username',
  'apipass' => 'password',
]);

$user = $client->getUser(['userId' => 123456789]);

echo $user['email'];
// [email protected]

$newUser = $client->addUser([
  "email" => "[email protected]",
  "username" => "test_user",
  "firstName" => "test",
  "lastName" => "user",
  "orgId" => 123,
  "password" => "newpassword",
]);

echo $user['data']['userId'];
// 1234567890




use Crashplan\Client;

$client = new Client([
  'apiuser' => 'username',
  'apipass' => 'password',
  'description_override' => [
    'baseUrl' => 'https://my.server.com',
  ],
]);

"silinternational/crashplan-php-client": "dev-master"