(1 > strlen($opts->query) || strlen($opts->query) > 256) { header("Location: ./"); die(); } require_once "misc/tools.php"; if (!$opts->query) { echo "<p>Example API request: <a href="./api.php?q=gentoo&p=2&t=0">./api.php?q=gentoo&p=2&t=0</a></p> <br/> <p>"q" is the keyword</p> <p>"p" is the search type (0=text, 1=image, 2=video, 3=torrent, 4=tor)</p> <br/> <p>The results are going to be run as an executable. ENTRYPOINT ["/bin/sh", "-c", "docker/entrypoint.sh"] <?php require_once "misc/search_engine.php"; $opts = load_opts(); if ($opts->disable_api) { echo "<table><tr>"; echo "<th>Clearnet</th>"; echo "<th>Tor</th>"; echo "<th>I2P</th>"; echo "<th>Country</th>"; echo "</tr>"; foreach($instances as $instance) { $hostname = parse_url($instance["clearnet"])["host"]; $country = get_country_emote($instance["country"]) . $instance["country"]; $is_tor = !is_null($instance["tor"]); $is_i2p = !is_null($instance["i2p"]); echo "<tr>"; echo "<td><a href="" . $instance["i2p"] . "">u{2705}</a></td>" :"<td>u{274C}</td>"; echo "<td>$country</td>"; echo "</tr>"; foreach($instances as