1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,38 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+require OBJETS_PATH.DIRECTORY_SEPARATOR."dns.class.php"; |
|
4 |
+ |
|
5 |
+header("Content-Type: text/plain"); |
|
6 |
+ |
|
7 |
+$bdd = new Bdd(); |
|
8 |
+$dns = Dns::getDNS($bdd,$url_params['ip']); |
|
9 |
+$alias = array(); |
|
10 |
+$reverseDns = Dns::getReverseDNS($bdd,$url_params['ip']); |
|
11 |
+foreach($reverseDns as $row){ |
|
12 |
+ $tab = Dns::getAliasFromDNS($bdd,$row['valeur2_dns']); |
|
13 |
+ $alias[] = $tab; |
|
14 |
+} |
|
15 |
+ |
|
16 |
+//Affichage |
|
17 |
+echo "<h3>DNS : </h3><br />"; |
|
18 |
+foreach($dns as $row){ |
|
19 |
+ echo $row['valeur1_dns']; |
|
20 |
+ echo "<br/>"; |
|
21 |
+} |
|
22 |
+echo "<br />"; |
|
23 |
+echo "<h3>Reverse DNS : </h3><br />"; |
|
24 |
+foreach($reverseDns as $row){ |
|
25 |
+ echo $row['valeur2_dns']; |
|
26 |
+ echo "<br/>"; |
|
27 |
+} |
|
28 |
+echo "<br />"; |
|
29 |
+echo "<h3>Alias : </h3><br />"; |
|
30 |
+ |
|
31 |
+if(isset($alias[0][0]['valeur1_dns'])) { |
|
32 |
+ foreach($alias as $rAlias){ |
|
33 |
+ foreach ($rAlias as $row) { |
|
34 |
+ echo $row['valeur1_dns']; |
|
35 |
+ echo "<br/>"; |
|
36 |
+ } |
|
37 |
+ } |
|
38 |
+} |
|
0 | 39 |
\ No newline at end of file |