<?php
	if ($_GET) {
		$site = $_GET['domain'];
		//$output = shell_exec("dig @1.1.1.1 +nocomments +nostats +noquestion +nocmd +trace $site ANY");
		$output = shell_exec("for i in {soa,ns,mx,a,aaaa,txt,caa}; do dig @1.1.1.1 +nocomments +nostats +noquestion +nocmd $site $i; done");
	}
	if ($_POST) {
		$site = $_POST['domain'];
		$output = shell_exec("dig @1.1.1.1 +nocomments +nostats +noquestion +nocmd +trace $site ANY");		$output = shell_exec("dig @1.1.1.1 +nocomments +nostats +noquestion +nocmd +trace $site ANY");

	}
	//$dig = escapeshellcmd("dig $site ANY");


	echo "<html>
	<head>
		<title>#&gt;dig $site</title>
		<link rel='icon' type='image/x-icon' href='dig.ico'>
		<link rel='stylesheet' type='text/css' href='style.css'>
	</head>
	<body style='background-color:black;color:white;margin-top:30px;width:99%'>";
	include 'header.php';
	include 'site-seal.php';
	echo "
		<pre><span style='font-size:1.5em;'>Domain Searched: $site</span>
&nbsp;
$output		</pre>
		<form method='POST' action='' id='myForm'>
			<label style='font-size:0.75em;'>Dig a(nother) domain</label>
			<input type='text' name='domain' placeholder='Domain name' required size='60'>
			<input type='submit' value='Submit'>
		</form>
	</body>
</html>";
?>
