Esempio n. 1
0
<?php

/**
 * This example orders a Vps,
 *
 * @copyright Copyright 2013 TransIP BV
 * @author TransIP BV <*****@*****.**>
 */
// Include vpsservice
require_once 'Transip/VpsService.php';
try {
    $productName = 'vps-bladevps-x1';
    $addons = array();
    $operatingSystemName = 'freebsd-10.2';
    $hostname = '';
    Transip_VpsService::orderVps($productName, $addons, $operatingSystemName, $hostname);
    echo 'Ordered VPS';
} catch (SoapFault $f) {
    // It is possible that an error occurs when connecting to the TransIP Soap API,
    // those errors will be thrown as a SoapFault exception.
    echo 'An error occurred: ' . $f->getMessage(), PHP_EOL;
}