createElementNS('http://www.yale.edu/tp/cas', 'cas:serviceResponse'); $response = $dom->createElement('cas:authenticationSuccess'); $user = $dom->createElement('cas:user', $ticket['user']); // TODO: attributes $response->appendChild($user); $root->appendChild($response); $dom->appendChild($root); echo $dom->saveXML(); die(); break; } header('HTTP/1.1 404 Not Found'); die('Invalid method');