<html>
	<body>
		<a href="view.php">View code</a><br/>
		<table>
			<?php
			$skip = array("PATH", "REMOTE_ADDR", "DOCUMENT_ROOT", "HTTPS", "GATEWAY_INTERFACE", "QUERY_STRING");
			$skipRegEx = "#^SSL_|^SERVER|^PHP_|^HTTP__|^SCRIPT_|^REQUEST_|^CONTEXT_|^REMOTE_|^HTTP_#"

			$logged = @$_SERVER['Shib-Session-ID'] != '' || @$_SERVER['REDIRECT_Shib-Session-ID'] != '';

			if(!$logged){
				echo('Please log in <a href="login">here</a>.');
			}else{
				foreach($_SERVER as $k => $v){
					if(!preg_match($skipRegEx, $k) && !in_array($k, $skip)){
						printf('<tr><td>%s</td><td>%s</td></tr>', $k, $v);
					}
				}
			}
			?>
		</table>
	</body>
</html>