"tor": null, "i2p": null, "country": "US", "librey": true }, { "name": "meow", "value": "<span>nyaa</span>", "verified_at": null }, { "shortcode": "floofCat", "static_url": "https://quack.social/files/dafaeb02-a2c1-4457-ad59-3b923ff3fbc3", "url": "https://quack.social/files/dafaeb02-a2c1-4457-ad59-3b923ff3fbc3", "visible_in_picker": true }, { "shortcode": "gentowo", "static_url": "https://quack.social/files/fca4f0e1-298d-4fdd-8541-2ef673e9bc11", "url": "https://quack.social/files/fca4f0e1-298d-4fdd-8541-2ef673e9bc11", "visible_in_picker": true } ] } <?php require_once "misc/header.php"; require_once "misc/tools.php"; $instances_json = json_decode(file_get_contents("instances.json"), true); $librey_instances = array_filter($instances_json['instances'], fn($n) => $n['librey']); $librex_instances = array_filter($instances_json['instances'], fn($n) => $n['librey']); $librex_instances = array_filter($instances_json['instances'], fn($n) => !$n['librey']); function list_instances($instances) { echo "<p>" . TEXTS["api_unavailable"] . "</p>"; die(); } $results = fetch_search_results($opts, false); if (array_key_exists("error", $results)) { http_response_code(500); } header("Content-Type: application/json");