Fritzbox
Version vom 21. Oktober 2022, 18:16 Uhr von Hamatoma (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „= Links = * == IP-Wechsel melden == <syntaxhighlight lang="php" <?php $pwort = 'ihr-passwort'; $dyntxt = "textdatei.txt"; $port = ":8080"; $pwortcontrol = $_…“)
Links
IP-Wechsel melden
<syntaxhighlight lang="php" <?php $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"); }
} </syntaxhiglight>