summaryrefslogtreecommitdiff
path: root/mirror.php
diff options
context:
space:
mode:
Diffstat (limited to 'mirror.php')
-rw-r--r--mirror.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/mirror.php b/mirror.php
index dee5b5c..65552b3 100644
--- a/mirror.php
+++ b/mirror.php
@@ -19,6 +19,15 @@
$ea = fopen($wurzel."erlaubteAdressen","r");
while (! feof($ea)) {
$zeile = trim(fgets($ea));
+ if ((strpos($zeile,"x:")!==false) &&
+ (strpos($_SERVER["SERVER_ADDR"],":")!==false)) {
+ $zeile = explode(":",$zeile);
+ $my_addr = explode(":",$_SERVER["SERVER_ADDR"]);
+ foreach ($zeile as $key => $val)
+ if ($val=="x")
+ $zeile[$key]=$my_addr[$key];
+ $zeile = implode(":",$zeile);
+ }
if ($zeile == $_SERVER["REMOTE_ADDR"])
break;
}