summaryrefslogtreecommitdiff
path: root/ddns-status.php
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-03-05 13:21:39 +0100
committerErich Eckner <git@eckner.net>2020-03-05 13:21:39 +0100
commitf3f2563759e5c8a6c001679c9450ee35cf44b54f (patch)
treed7df687afd3e9f1e592d29ba4ffd27b9ea49e0f9 /ddns-status.php
parentb265b4fe49812f42ad6c0cf9f89156a7151cfe8d (diff)
downloadddns-f3f2563759e5c8a6c001679c9450ee35cf44b54f.tar.xz
ddns-status.php: more compact output
Diffstat (limited to 'ddns-status.php')
-rw-r--r--ddns-status.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/ddns-status.php b/ddns-status.php
index 5abfa3f..6ab6c4b 100644
--- a/ddns-status.php
+++ b/ddns-status.php
@@ -29,9 +29,9 @@ while (($line = fgets($pin)) !== false) {
continue;
if ($line[3] == 'A')
- $axfr[$line[0]][$line[3]] = "IPv4";
+ $axfr[$line[0]][$line[3]] = '4';
if ($line[3] == 'AAAA')
- $axfr[$line[0]][$line[3]] = "IPv6";
+ $axfr[$line[0]][$line[3]] = '6';
if ($_SERVER['REMOTE_ADDR'] == $line[4])
$found = true;
}
@@ -68,7 +68,7 @@ function print_existence($prefix, $host) {
return;
}
print $prefix . "<font color=\"00ff00\">\n";
- print $prefix . " " . implode(' &amp; ', $axfr[$host . '.ddns.eckner.net.']) . "\n";
+ print $prefix . " IPv" . implode('&amp;', $axfr[$host . '.ddns.eckner.net.']) . "\n";
print $prefix . "</font>\n";
}