dns_get_record()を介してドメインのDNSレコードを取得しようとしていますが、変数が挿入されたときに関数が機能しないようです。これが私のコードです
<form action="" method="post">
<input type="text" name="host" placeholder="Enter IP or Domain"/>
<select name="dns">
<option value="DNS_A" selected="selected">A</option>
....
<option value="DNS_ANY">ANY</option>
</select>
</form>
<?php
$host=$_POST['host'];
$dns=$_POST['dns'];
$type=end(explode('_',$dns));
if ($host==""){
exit();
}
echo "Results for $host $type record<br />";
$result = dns_get_record($host, $dns);
echo "Result = ";
print_r($result);
?>
でも入れたら
$result = dns_get_record($host, DNS_A);
それ以外の
$result = dns_get_record($host, $dns);
それは動作します..ヘルプ!