Magic-Auth Diagnostic';
	if(! local_user()) {
		notice( t('Permission denied.') . EOL);
		return $o;
	}
	$o .= '
'; 
	$o .= '
';
	if(x($_GET,'dest')) {
		$_REQUEST['test'] = 1;
		$x = magic_init($a);
		$o .= 'Local Setup returns: ' . print_r($x,true);
		if($x['url']) {
			$z = z_fetch_url($x['url'] . '&test=1');
			if($z['success']) {
				$j = json_decode($z['body'],true);
				if(! $j)
					$o .= 'json_decode failure from remote site. ' . print_r($z['body'],true);
				$o .= 'Remote site responded: ' . print_r($j,true);
			}
			else {
				$o .= 'fetch url failure.' . print_r($z,true);
			}
		}
	}
	return str_replace("\n",'
',$o);
}