<?php

/**
 * This example requests remotehands
 *
 * @copyright Copyright 2011 TransIP BV
 * @author TransIP BV <*****@*****.**>
 */
require_once 'Transip/ColocationService.php';
if (isset($_POST['request']) && count($_POST['request']) > 0) {
    extract($_POST['request']);
    try {
        $dataCenterHandsRequest = Transip_ColocationService::requestRemoteHands($coloName, $contactName, $phoneNumber, $expectedDuration, $instructions);
        $result = 'The request has been sent.';
    } catch (SoapFault $e) {
        // It is possible that an error occurs when connecting to the TransIP Soap API,
        // those errors will be thrown as a SoapFault exception.
        $result = 'An error occurred: ' . htmlspecialchars($e->getMessage());
    }
}
?>
<html>
<head>
	<title>TransIP API Datacenter Remote Hands Request</title>
</head>

<body>
	<h2>TransIP API Datacenter Remote Hands Request</h2>
	<?php 
echo isset($result) ? '<p><pre>' . $result . '</pre></p>' : '';
?>