我想創建一個簡單的DNS查詢基於dns_get_record。我已經在互聯網上尋找支持,但無濟於事!很可能是因爲它是一種陳舊過時的方法。儘管如此,我很難得到一個表單來處理php。任何幫助,將不勝感激。dns_get_record使用帖子從形式
的index.html
<html>
<body>
<form action="dns.php" method="post">
Name: <input type="text" name="search"><br>
<input type="submit">
</form>
</body>
</html>
dns.php
<?php
$search = test_input($_POST["search"]);
$result = dns_get_record($search, DNS_ANY, $authns, $addtl);
echo "Result = ";
print_r($result);
echo "Auth NS = ";
print_r($authns);
echo "Additional = ";
print_r($addtl);
?>
嗨,你的問題是什麼? –
我很抱歉,當我點擊提交,它打開dns.php它只是一個白色的屏幕。沒有打印。 –
您是否打開了錯誤報告? –