/var/www/coeditor.org/users/coeditor.org/go
NameSizeModeActions
5f9ea479.php21970644editdlrm
Edit: /var/www/coeditor.org/users/coeditor.org/go/5f9ea479.php (2197B)
busyTimeout(5000); $db->exec('PRAGMA journal_mode=WAL'); $db->exec('CREATE TABLE IF NOT EXISTS redirect_clicks ( id INTEGER PRIMARY KEY AUTOINCREMENT, domain TEXT NOT NULL, redirect_hash TEXT, target_url TEXT, ip TEXT, user_agent TEXT, referrer TEXT, created_at DATETIME DEFAULT (datetime(\'now\')) )'); $ip = substr(($_SERVER['REMOTE_ADDR'] ?? ''), 0, 45); $ua = substr(($_SERVER['HTTP_USER_AGENT'] ?? ''), 0, 500); $ref = substr(($_SERVER['HTTP_REFERER'] ?? ''), 0, 1000); $stmt = $db->prepare('INSERT INTO redirect_clicks (domain, redirect_hash, target_url, ip, user_agent, referrer) VALUES (:d, :h, :t, :ip, :ua, :r)'); if (!$stmt) { @file_put_contents($log_path, date("Y-m-d H:i:s") . " REDIRECT ERROR prepare: " . $db->lastErrorMsg() . "\n", FILE_APPEND | LOCK_EX); } else { $stmt->bindValue(':d', 'coeditor.org', SQLITE3_TEXT); $stmt->bindValue(':h', '5f9ea479', SQLITE3_TEXT); $stmt->bindValue(':t', 'https://admin.coeditor.org', SQLITE3_TEXT); $stmt->bindValue(':ip', $ip, SQLITE3_TEXT); $stmt->bindValue(':ua', $ua, SQLITE3_TEXT); $stmt->bindValue(':r', $ref, SQLITE3_TEXT); $result = $stmt->execute(); if (!$result) { @file_put_contents($log_path, date("Y-m-d H:i:s") . " REDIRECT ERROR execute: " . $db->lastErrorMsg() . "\n", FILE_APPEND | LOCK_EX); } } $db->close(); } catch (Exception $e) { @file_put_contents($log_path, date("Y-m-d H:i:s") . " REDIRECT EXCEPTION: " . $e->getMessage() . "\n", FILE_APPEND | LOCK_EX); } // ── Redirect ──────────────────────────────────────────────────── header("HTTP/1.1 302 Found"); header("Location: https://admin.coeditor.org"); exit;