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; } /* Split Name */ function split_name($name, $prefix = '') { $pos = strrpos($name, ' '); if ($pos === false) { return array($prefix . 'firstname' => $name, $prefix . 'surname' => null); } $firstname = substr($name, 0, $pos + 1); $surname = substr($name, $pos);