2013-10-23 24 views
0

我想創建一個簡單的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); 
?> 
+0

嗨,你的問題是什麼? –

+0

我很抱歉,當我點擊提交,它打開dns.php它只是一個白色的屏幕。沒有打印。 –

+0

您是否打開了錯誤報告? –

回答

0

你試過沒有test_input功能?

$search = $_POST["search"]; 
+0

我害怕沒有工作。 –

+0

OK,你可以嘗試以下方法:0)打開PHP錯誤日誌記錄,1)'DNS_ALL'而不是'DNS_ANY',2)在php.ini中搜索'disable_functions'設置,3)將PHP更新到版本> = 5.3 **在Linux框**上。 – Edakos