Example #1
0
    $value = $client->CreateTrialCompany($parameters);
    $key = (string) $value->CreateTrialCompanyResult;
    $result['success'] = strlen($key) ? true : false;
    $result['key'] = $key;
    $result['subdomain'] = $_GET['subdomain'];
    $result['response'] = $value;
    //before response wait 5 seconds (To allow subdomain to be set up at Amazon because immediate redirect to the account will follow)
    sleep(5);
    header("Content-Type: application/json");
    echo json_encode($result);
    exit;
}
/* Check if Subdomain Exists */
if (isset($_GET['subdomainCheck'])) {
    $parameters = array('Subdomain' => $_GET['subdomain']);
    $value = $client->IsSubDomainExists($parameters);
    $result['exists'] = $value->IsSubDomainExistsResult;
    $result['response'] = $value;
    header("Content-Type: application/json");
    echo json_encode($result);
    exit;
}
/* Check if Email Exists */
if (isset($_GET['emailCheck'])) {
    $parameters = array('Email' => $_GET['email']);
    $value = $client->IsEmailExists($parameters);
    $result['exists'] = $value->IsEmailExistsResult;
    $result['response'] = $value;
    header("Content-Type: application/json");
    echo json_encode($result);
    exit;