Location: PHPKode > projects > WeBBind Web Gui to Bind > webbind_0.98/nslookup.php
<?
require("htmlcommon.php");
require("global.php");

$nsresult="/tmp/".time()."nsresult.txt";

exec ("nslookup -q=$querytype $zonename $nsqueryserver > $nsresult");


HTMLHeader();
Banner("NSLookup Query Results",$username,$server);

        print("<center><table BORDER COLS=1 WIDTH=\"100%\" >");

        
 $fp=fopen("$nsresult", "r");
 while (!feof ($fp)) {
        $buffer = fgets($fp, 4096);
	        print("<tr BGCOLOR=\"#090B55\">");
        	print("<td>");
        	print("<font face=\"Verdana\" size=1 font color=\"#FFFFFF\"><B>$buffer</B></font>");
        	print("</td>");
        	print("</tr>");
  }
	print("</table></center>");

print("<center><table BORDER COLS=4 WIDTH=\"100%\" >");
print("<TR>");
	print("<TD width=\"25%\"><CENTER><FONT FACE=\"Verdana\" SIZE=2 ><B><A HREF=\"nslookup.php?username=$username&zonename=$zonename&querytype=any\">ANY</A><TD>\n");
	print("<TD width=\"25%\"><CENTER><FONT FACE=\"Verdana\" SIZE=2 ><B><A HREF=\"nslookup.php?username=$username&zonename=$zonename&querytype=soa\">SOA</A><TD>\n");
	print("<TD width=\"25%\"><CENTER><FONT FACE=\"Verdana\" SIZE=2 ><B><A HREF=\"nslookup.php?username=$username&zonename=$zonename&querytype=mx\">MX</A><TD>\n");
	print("<TD width=\"25%\"><CENTER><FONT FACE=\"Verdana\" SIZE=2 ><B><A HREF=\"nslookup.php?username=$username&zonename=$zonename&querytype=ns\">NS</A><TD>\n");
print("</TR>");
print("</table></center>");

		print("<center><table BORDER COLS=1 WIDTH=\"100%\" >");
        	print("<tr BGCOLOR=\"#C0C0C0\">");
		print("<td>");
        	print("<font face=\"Verdana\" size=2 font color=\"#FFFFFF\"><center><A HREF=\"$phpbindurl\">Return to Search Page</A>");
        	print("</td>");
        	print("</tr>");
        	print("</table></center>");

 fclose($fp);

unlink($nsresult);
?>
Return current item: WeBBind Web Gui to Bind