コード例 #1
0
 */
require_once 'Transip/DomainService.php';
if (isset($_REQUEST['domain']) && strlen($_REQUEST['domain']) > 0) {
    $domain = $_REQUEST['domain'];
    try {
        // Check to see if we an action was requested and if so, do it
        if (isset($_POST['lock'])) {
            // Lock the  domain by using the Transip_DomainService API;
            $isLocked = Transip_DomainService::setLock($domain);
        }
        if (isset($_POST['unlock'])) {
            // Unlock the domain by using the Transip_DomainService API;
            $isLocked = Transip_DomainService::unsetLock($domain);
        }
        // Request the locked status of a domain by using the Transip_DomainService API;
        $isLocked = Transip_DomainService::getIsLocked($domain);
    } 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.
        $whois = 'An error occurred: ' . htmlspecialchars($e->getMessage());
    }
} else {
    $domain = '';
    $isLocked = false;
}
?>
<html>
<head>
</head>

<body>