<?php
header('Content-Type: application/opensearchdescription+xml; charset=utf-8');
require_once __DIR__ . '/system/config.php';
$siteName = 'Korsyl';
$base     = rtrim(BASE_URL, '/');
?>
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"
                       xmlns:moz="http://www.mozilla.org/2006/browser/search/">
  <ShortName><?= htmlspecialchars($siteName) ?></ShortName>
  <LongName>Korsyl — Safe, Private, Ad-Free Search</LongName>
  <Description>Search the web safely with Korsyl — no ads, no tracking, human-verified results.</Description>
  <Tags>search safe private family-friendly verified</Tags>
  <Contact>https://<?= parse_url($base, PHP_URL_HOST) ?>/feedback</Contact>
  <InputEncoding>UTF-8</InputEncoding>
  <OutputEncoding>UTF-8</OutputEncoding>
  <Language>*</Language>
  <Image width="16" height="16" type="image/svg+xml"><?= $base ?>/assets/img/favicon.svg</Image>
  <Image width="64" height="64" type="image/svg+xml"><?= $base ?>/assets/img/favicon.svg</Image>
  <Url type="text/html" method="get" template="<?= $base ?>/search?q={searchTerms}&amp;p={startPage?}"/>
  <Url type="application/x-suggestions+json" rel="suggestions"
       template="<?= $base ?>/api/suggest.php?q={searchTerms}"/>
  <Url type="application/opensearchdescription+xml" rel="self"
       template="<?= $base ?>/opensearch.xml"/>
  <moz:SearchForm><?= $base ?>/</moz:SearchForm>
  <AdultContent>false</AdultContent>
</OpenSearchDescription>
