$line) { $candidateRaw = trim(rawurldecode($line)); $candidateLower = mb_strtolower($candidateRaw, 'UTF-8'); $slug = str_replace(' ', '-', $candidateLower); if ($slug === $incomingSlug) { $BRAND = strtoupper($candidateLower); $NUMLIST = $i + 1; break; } } if ($BRAND === '') { header("HTTP/1.1 410 Gone"); exit("🛑 Brand '{$incomingRaw}' not found."); } } else { header("HTTP/1.1 404 Not Found"); exit("🛑 Missing 'video' parameter."); } $BRANDS = $BRAND; // Random selections from config arrays $randomEmoji = $emojis[array_rand($emojis)]; $randomWord = $words[array_rand($words)]; $randomImg = $images[array_rand($images)]; $randomTitleText = $randomTitles[array_rand($randomTitles)]; $randomDescText = $randomDescriptions[array_rand($randomDescriptions)]; date_default_timezone_set('Asia/Bangkok'); $timestamp = date('Y-m-d H:i:s'); // Final title and description $title = "{$BRANDS} {$randomEmoji} {$randomWord} {$randomTitleText}"; $desc = "{$BRANDS} {$randomWord} {$randomDescText}"; ?>