public function index() { ContentNegotiator::disable(); BasicAuth::disable(); $request_count = count($_REQUEST); $get_count = count($_GET); $post_count = count($_POST); $request = ''; foreach ($_REQUEST as $key=>$value) { $request .= "\t\t<request_item name=\"$key\">$value</request_item>\n"; } $get = ''; foreach ($_GET as $key => $value) { $get .= "\t\t<get_item name=\"$key\">$value</get_item>\n"; } $post = ''; foreach ($_POST as $key => $value) { $post .= "\t\t<post_item name=\"$key\">$value</post_item>\n"; } $out = <<<XML <?xml version="1.0"?> <test> <request count="$request_count"> $request </request> <get count="$get_count"> $get </get> <post count="$post_count"> $post </post> </test> XML; header('Content-type: text/xml'); echo $out; }
/** * Standard method, not in use. */ function index() { BasicAuth::disable(); return "failed"; }
function init() { BasicAuth::disable(); parent::init(); }