diff --git a/README.md b/README.md index 7e041e7..c65a0bf 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,6 @@ | [search.milivojevic.in.rs](https://search.milivojevic.in.rs/) | [✅](http://librex2xsek6qnh2i4yufuzqjumfdwtw7io7omgmimpzna6llqudqzyd.onion/) | ❌ | 🇳🇱 NL | | [librex.nekus.gay](https://librex.nekus.gay/) | [✅](http://5yblccekvswxl4n43bn5eg4pr7c4xygvu5lhhdb6ulzmislvahmhitad.onion/) | ❌ | 🇵🇱 PL | | [search.davidovski.xyz](https://search.davidovski.xyz/) | ❌ | ❌ | 🇬🇧 UK | -| [search.funami.tech](https://search.funami.tech/) | ❌ | ❌ | 🇰🇷 KR | | [search.madreyk.xyz](https://search.madreyk.xyz/) | ❌ | ❌ | 🇩🇪 DE | | [search.pabloferreiro.es](https://search.pabloferreiro.es/) | ❌ | ❌ | 🇩🇪 DE | | [buscar.weblibre.org](https://buscar.weblibre.org/) | ❌ | ❌ | 🇨🇱 CL | diff --git a/config.php.example b/config.php.example index 7075547..531749e 100644 --- a/config.php.example +++ b/config.php.example @@ -7,7 +7,7 @@ // Google results will be in this language "google_language" => "en", - // If you have a local instance you can change this to http://localhost:3000 + // You can use any Invidious instance here "invidious_instance_for_video_results" => "https://invidious.namazso.eu", "disable_bittorent_search" => false, diff --git a/image_proxy.php b/image_proxy.php index e0004b4..bfeab02 100644 --- a/image_proxy.php +++ b/image_proxy.php @@ -13,7 +13,7 @@ $image = $url; $image_src = request($image); - header("Content-Type: image/jpeg"); + header("Content-Type: image/png"); echo $image_src; } ?> diff --git a/instances.json b/instances.json index e455d7b..58dee81 100644 --- a/instances.json +++ b/instances.json @@ -48,12 +48,6 @@ "i2p": null, "country": "UK" }, - { - "clearnet": "https://search.funami.tech/", - "tor": null, - "i2p": null, - "country": "KR" - }, { "clearnet": "https://search.madreyk.xyz/", "tor": null, @@ -115,10 +109,10 @@ "country": "IN" }, { - "clearnet": "https://lx.drain.win", - "tor": null, - "i2p": null, - "country": "SG" + "clearnet": "https://lx.drain.win", + "tor": null, + "i2p": null, + "country": "SG" } ] } diff --git a/misc/header.php b/misc/header.php index 933364a..10a2435 100644 --- a/misc/header.php +++ b/misc/header.php @@ -9,8 +9,8 @@ "/> diff --git a/misc/tools.php b/misc/tools.php index 0e002c9..950b793 100644 --- a/misc/tools.php +++ b/misc/tools.php @@ -21,12 +21,10 @@ { $config = require "config.php"; - if (isset($_COOKIE[$frontend]) || isset($_REQUEST[$frontend]) || !empty($config->$frontend)) + if (isset($_COOKIE[$frontend]) || !empty($config->$frontend)) { if (isset($_COOKIE[$frontend])) $frontend = $_COOKIE[$frontend]; - else if (isset($_REQUEST[$frontend])) - $frontend = $_REQUEST[$frontend]; else if (!empty($config->$frontend)) $frontend = $config->$frontend; @@ -140,7 +138,7 @@ function check_for_special_search($query) { - if (isset($_COOKIE["disable_special"]) || isset($_REQUEST["disable_special"])) + if (isset($_COOKIE["disable_special"])) return 0; $query_lower = strtolower($query); @@ -226,13 +224,6 @@ function print_next_page_button($text, $page, $query, $type) { echo "
"; - foreach($_REQUEST as $key=>$value) - { - if ($key != "q" && $key != "p" && $key != "t") - { - echo ""; - } - } echo ""; echo ""; echo ""; diff --git a/search.php b/search.php index 3bd3e48..ad5ea74 100644 --- a/search.php +++ b/search.php @@ -29,14 +29,6 @@ >
$value) - { - if ($key != "q" && $key != "p" && $key != "t") - { - echo ""; - } - } - $type = isset($_REQUEST["t"]) ? (int) $_REQUEST["t"] : 0; echo ""; ?> @@ -120,10 +112,14 @@ break; default: + $query_parts = explode(" ", $query); + $last_word_query = end($query_parts); + if (substr($query, 0, 1) == "!" || substr($last_word_query, 0, 1) == "!") + check_ddg_bang($query); require "engines/google/text.php"; - $results = get_text_results($query_encoded, $page); - print_text_results($results); + $results = get_text_results($query, $page); print_elapsed_time($start_time); + print_text_results($results); break; } diff --git a/settings.php b/settings.php index 5c34166..3eee5ef 100644 --- a/settings.php +++ b/settings.php @@ -30,7 +30,7 @@ if (isset($_REQUEST["save"]) || isset($_REQUEST["reset"])) { - header("Location: ./settings.php"); + header("Location: ./"); die(); }