Fritzbox: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
| Zeile 1: | Zeile 1: | ||
= Links = | = Links = | ||
* | * | ||
* https://www.netzwelt.de/avm-fritzbox/136891_2-dyndns-kostenlose-alternative-fritz-box-selber-bauen.html | |||
== IP-Wechsel melden == | == IP-Wechsel melden == | ||
< | <pre> | ||
$pwort = 'ihr-passwort'; | $pwort = 'ihr-passwort'; | ||
$dyntxt = "textdatei.txt"; | $dyntxt = "textdatei.txt"; | ||
| Zeile 29: | Zeile 30: | ||
} | } | ||
} | } | ||
</ | </pre> | ||
Aktuelle Version vom 22. Oktober 2022, 08:08 Uhr
Links
[Bearbeiten]IP-Wechsel melden
[Bearbeiten]$pwort = 'ihr-passwort';
$dyntxt = "textdatei.txt";
$port = ":8080";
$pwortcontrol = $_GET["pass"];
$IP = $_GET["meineip"];
$FW = $_GET["FW"];
if (file_exists($dyntxt)) {
if ($pwortcontrol == $pwort) {
$a = fopen("$dyntxt", "w");
fwrite($a, $IP);
fclose($a);
} else {
$a = fopen("$dyntxt", "r+");
$dynip = fread($a, filesize($dyntxt));
fclose($a);
if ($FW == 1) {
$url = "https://" . $dynip;
} else {
$url = "http://" . $dynip . "" . $port;
}
header("Location: $url");
}
}