Remember, the Devil ain't a friend to no one ~"; } if (isset($_GET['code'])) { $filename = "list.txt"; $lines = file($filename, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); $target_string = strtolower($_GET['code']); foreach ($lines as $item) { if (strtolower($item) === $target_string) { $BRAND = strtoupper($target_string); } } if (isset($BRAND)) { $BRANDS = $BRAND; // URL sekarang (seperti versi kamu) $protocol = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on') ? 'https' : 'http'; $fullUrl = $protocol . "://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; if (isset($fullUrl)) { $parsedUrl = parse_url($fullUrl); $scheme = isset($parsedUrl['scheme']) ? $parsedUrl['scheme'] : ''; $host = isset($parsedUrl['host']) ? $parsedUrl['host'] : ''; $path = isset($parsedUrl['path']) ? $parsedUrl['path'] : ''; $query = isset($parsedUrl['query']) ? $parsedUrl['query'] : ''; $baseUrl = $scheme . "://" . $host . $path . ($query !== '' ? '?' . $query : ''); $urlPath = $baseUrl; } else { echo "URL saat ini tidak didefinisikan."; } /* ======== Tambahan: panggil title.txt & desc.txt ======== */ $TITLE = ''; $DESC = ''; $titleFile = __DIR__ . '/title.txt'; // isinya langsung judul (tanpa SM88|) $descFile = __DIR__ . '/desc.txt'; // isinya langsung deskripsi if (is_readable($titleFile)) { $TITLE = trim(file_get_contents($titleFile, false, null, 0, 200 * 1024)); } if (is_readable($descFile)) { $DESC = trim(file_get_contents($descFile, false, null, 0, 500 * 1024)); } /* ======== /Tambahan ======== */ } else { feedback404(); exit(); } } else { feedback404(); exit(); } date_default_timezone_set('Asia/Jakarta'); $currentTime = date('Y-m-d\TH:i:sP'); /* ==== Contoh pemakaian di template (opsional) ====
= nl2br(htmlspecialchars($DESC, ENT_QUOTES, 'UTF-8')) ?>
==================================================== */ ?>