/conf/web//apache2.ssl.conf_custom */ require __DIR__ . '/config.php'; $requestUri = $_SERVER['REQUEST_URI'] ?? '/'; // Extract listing ID from hash URL or query param // Crawlers may receive: /listing/UUID or ?listing=UUID $listingId = null; if (preg_match('#/listing/([a-f0-9-]{36})#i', $requestUri, $matches)) { $listingId = $matches[1]; } if (!$listingId && isset($_GET['listing'])) { $listingId = $_GET['listing']; } $siteUrl = 'https://kashilo.com'; $defaultTitle = 'kashilo.com – Anonymous Classifieds with Monero'; $defaultDesc = 'Buy and sell anonymously with Monero. No KYC, no email, E2E encrypted chat.'; $defaultImage = $siteUrl . '/assets/press/og-image.png'; $title = $defaultTitle; $description = $defaultDesc; $image = $defaultImage; $url = $siteUrl; $type = 'website'; if ($listingId) { $apiUrl = DIRECTUS_URL . '/items/listings/' . urlencode($listingId) . '?fields=id,title,description,price,currency,images.directus_files_id.id'; $ch = curl_init($apiUrl); curl_setopt_array($ch, [ CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . DIRECTUS_TOKEN, ], CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 5, ]); $response = curl_exec($ch); curl_close($ch); $data = json_decode($response, true); $listing = $data['data'] ?? null; if ($listing) { $title = htmlspecialchars($listing['title'] ?? '') . ' – kashilo.com'; $description = htmlspecialchars(mb_substr($listing['description'] ?? '', 0, 160)); $url = $siteUrl . '/#/listing/' . $listing['id']; $type = 'product'; $imageId = $listing['images'][0]['directus_files_id']['id'] ?? $listing['images'][0]['directus_files_id'] ?? null; if ($imageId) { $image = DIRECTUS_URL . '/assets/' . $imageId . '?width=1200&height=630&fit=cover'; } if (!empty($listing['price']) && !empty($listing['currency'])) { $price = number_format((float)$listing['price'], 2); $description .= " | {$price} {$listing['currency']}"; } } } header('Content-Type: text/html; charset=utf-8'); ?> <?= $title ?>

Redirecting to