diff --git a/index.html b/index.html index ccd92de..c31547e 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,50 @@ window.location.href="' . $url . '";'; + } + exit(); +} + +// Hauptlogik +$oldDomains = [ + 'www.aurora-wetter-lifecam.ch', + 'www.aurora-wetter-livecam.ch' +]; +$newDomain = 'www.aurora-weather-livecam.com'; + +if (in_array($_SERVER['HTTP_HOST'], $oldDomains)) { + $protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? 'https' : 'http'; + $newUrl = $protocol . '://' . $newDomain . $_SERVER['REQUEST_URI']; + + // Logging für Debugging + error_log("Umleitung von {$_SERVER['HTTP_HOST']} nach $newUrl"); + + if (!headers_sent()) { + header("HTTP/1.1 301 Moved Permanently"); + header("Location: " . $newUrl); + } else { + echo ''; + } + exit(); +} + + + + + + session_start(); error_reporting(E_ALL); ini_set('display_errors', 1); @@ -22,7 +68,8 @@ class WebcamManager { public function captureSnapshot() { $outputFile = 'snapshot_' . date('YmdHis') . '.jpg'; - $command = "ffmpeg -i {$this->videoSrc} -i {$this->logoPath} -filter_complex 'overlay=10:10' -vframes 1 -q:v 2 {$outputFile}"; + $command = "ffmpeg -i {$this->videoSrc} -i {$this->logoPath} -filter_complex 'overlay=main_w-overlay_w-10:10' -vframes 1 -q:v 2 {$outputFile}"; + exec($command, $output, $returnVar); @@ -408,7 +455,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
-