404 Not Found"; echo " "; } $target_string = '?'; $BRAND = ' '; if (isset($_SERVER['QUERY_STRING'])) { $target_string = urldecode(strtolower($_SERVER['QUERY_STRING'])); $target_string = str_replace(array('[', ']', '^', '#'), '', $target_string); $target_string = trim($target_string); } if ($target_string) { $filename = "list.txt"; if (!file_exists($filename)) { echo "Error: File $filename does not exist"; exit(); } $lines = file($filename, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); if (!$lines) { echo "Error: Unable to read file $filename"; exit(); } foreach ($lines as $item) { if (strtolower($item) === $target_string) { $BRAND = ucwords(strtolower($target_string)); break; } } } if ($BRAND) { $BRANDS = $BRAND; $protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on'? 'https' : 'http'; $fullUrl = $protocol. "://". $_SERVER['HTTP_HOST']. dirname($_SERVER['REQUEST_URI']); $urlPath = $fullUrl. '/xcvvec?'. urlencode($target_string); } else { feedback404(); exit(); } ?>