PHP code example of vmware-pulsant / vcloud-sdk

1. Go to this page and download the library: Download vmware-pulsant/vcloud-sdk 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/ */

    

vmware-pulsant / vcloud-sdk example snippets


// On top of your script

// $hostname = ...
// $username = ...
// $organization = ...
// $password = ...
// $apiVersion = ...
try {
    $service = \VMware_VCloud_SDK_Service::getService();
    $service->login(
        $hostname,
        array(
            'username' => $username . '@' . $organization,
            'password' => $password,
        ),
        array(
            'proxy_host' => null,
            'proxy_port' => null,
            'proxy_user' => null,
            'proxy_password' => null,
            'ssl_verify_peer' => false,
            'ssl_verify_host' => false,
            'ssl_cafile'  => null,
        ),
        $apiVersion
    );
} catch (\VMware_VCloud_SDK_Exception $e) {
    throw new \Exception('Login failed');
}
bash
php composer.phar update