Viewing File server/web/admin.dns.php of 1.17.0a
|
Get host by name : | "; 46: echo ""; 47: echo ""; 48: echo " |
Get host by address : | "; 54: echo ""; 55: echo ""; 56: echo " |
"; 100: echo "Query :"; 101: echo " | "; 102: echo " "; 103: echo "104: echo ""; 105: echo ""; 106: echo ""; 107: echo ""; 108: echo ""; 109: echo ""; 110: echo ""; 111: echo ""; 112: echo ""; 113: echo " |
"; 114: echo "Nameserver :"; 115: echo " | "; 116: echo " "; 117: echo "port "; 118: echo " |
Options : | "; 119: echo "";
120:
121: if (!$udp) $s=" checked";
122: else $s="";
123: echo " Use TCP "; 124: 125: if ($debug) $s=" checked"; 126: else $s=""; 127: echo " Debug Data "; 128: 129: if ($binarydebug) $s=" checked"; 130: else $s=""; 131: echo " Binary Debug "; 132: 133: if ($extendanswer) $s=" checked"; 134: else $s=""; 135: echo " Show Detail "; 136: echo " |
";
137: echo " "; 138: echo " |
";145: $query=new DNSQuery($server,$port,$timeout,$udp,$debug); 146: if ($binarydebug) $query->binarydebug=true; 147: 148: if ($type=="SMARTA") 149: { 150: echo "Smart A Lookup for ".$question."\n\n"; 151: $hostname=$query->SmartALookup($question); 152: echo "Result: ".$hostname."\n\n"; 153: echo ""; 154: Screen_Footer(); 155: exit(); 156: } 157: 158: echo "Querying: ".$question." -t ".$type." @".$server."\n"; 159: 160: $result=$query->Query($question,$type); 161: 162: if ($query->error) 163: { 164: echo "\nQuery Error: ".$query->lasterror."\n\n"; 165: exit(); 166: } 167: echo "Returned ".$result->count." Answers\n\n"; 168: 169: function ShowSection($result) 170: { 171: global $extendanswer; 172: for ($i=0; $i<$result->count; $i++) 173: { 174: echo $i.". "; 175: if ($result->results[$i]->string=="") 176: echo $result->results[$i]->typeid."(".$result->results[$i]->type.") => ".$result->results[$i]->data; 177: else echo $result->results[$i]->string; 178: echo "\n"; 179: if ($extendanswer) 180: { 181: echo " - record type = ".$result->results[$i]->typeid." (# ".$result->results[$i]->type.")\n"; 182: echo " - record data = ".$result->results[$i]->data."\n"; 183: echo " - record ttl = ".$result->results[$i]->ttl."\n"; 184: if (count($result->results[$i]->extras)>0) // additional data 185: { 186: foreach($result->results[$i]->extras as $key => $val) 187: { 188: echo " + ".$key." = ".$val."\n"; 189: } 190: } 191: } 192: echo "\n"; 193: } 194: } 195: ShowSection($result); 196: 197: if ($extendanswer) 198: { 199: echo "\nNameserver Records: ".$query->lastnameservers->count."\n"; 200: ShowSection($query->lastnameservers); 201: 202: echo "\nAdditional Records: ".$query->lastadditional->count."\n"; 203: ShowSection($query->lastadditional); 204: } 205: 206: echo ""; 207: } 208: 209: 210: Screen_Footer(); 211: ?> 212: