I am trying to create a simple DNS query based on dns_get_record. I have scoured the internet for support on this but to no avail! Most likely because it is an old and outdated method. Nevertheless, I am having a hard time getting a form to work with the php. Any help would be appreciated.
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);
?>
您是否尝试过不带test_input
函数?
$search = $_POST["search"];
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.