diff options
author | Erich Eckner <git@eckner.net> | 2020-03-05 13:21:39 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-03-05 13:21:39 +0100 |
commit | f3f2563759e5c8a6c001679c9450ee35cf44b54f (patch) | |
tree | d7df687afd3e9f1e592d29ba4ffd27b9ea49e0f9 /ddns-status.php | |
parent | b265b4fe49812f42ad6c0cf9f89156a7151cfe8d (diff) | |
download | ddns-f3f2563759e5c8a6c001679c9450ee35cf44b54f.tar.xz |
ddns-status.php: more compact output
Diffstat (limited to 'ddns-status.php')
-rw-r--r-- | ddns-status.php | 6 |
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(' & ', $axfr[$host . '.ddns.eckner.net.']) . "\n"; + print $prefix . " IPv" . implode('&', $axfr[$host . '.ddns.eckner.net.']) . "\n"; print $prefix . "</font>\n"; } |