Redirect searches to Ethical Search Engines
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

118 lines
4.6 KiB

if (strpos($_SERVER['REQUEST_URI'], 'index.php') !== false) {
$newLink = str_replace('/index.php','', $_SERVER['REQUEST_URI']);
header('Location: '.$newLink);
$searchsite = ['',
$q = $_GET['q'];
if (isset($q)) {
goSearch($q, $searchsite);
if (isset($_GET['theme']) && $_GET['theme'] == 'dark') {
$csstheme = "logicodev-dark.min.css";
$labeltheme = "Light";
$linktheme = "/";
} else {
$csstheme = "logicodev.min.css";
$labeltheme = "Dark";
$linktheme = "/?theme=dark";
<!DOCTYPE html>
Template cloned by Searx:
<meta charset="UTF-8" />
<meta property="og:title" content="Search for Planet">
<meta property="og:description" content="Redirect searches to Ethical Search Engines">
<meta property="og:type" content="website">
<meta property="og:url" content="">
<meta property="og:image" content="icon-big-128.png">
<meta name="description" content="Redirect searches to Ethical Search Engines" />
<meta name="keywords" content="search, search engine, ethical search, ethical" />
<meta name="referrer" content="no-referrer">
<meta name="viewport" content="width=device-width, initial-scale=1 , maximum-scale=1.0, user-scalable=1" />
<link rel="stylesheet" href="bootstrap.min.css" type="text/css" />
<link rel="stylesheet" href="<?=$csstheme;?>" type="text/css" />
<link rel="stylesheet" href="leaflet.min.css" type="text/css" />
<link rel="shortcut icon" href="favicon.ico" />
<link rel="search" href="opensearch.xml" type="application/opensearchdescription+xml" title="Search For Planet" />
<div class="searx-navbar">
<span class="instance pull-left"><a href="" target="_blank">What is</a></span>
<span class="pull-right"><a href="<?=$linktheme;?>"><?=$labeltheme;?></a><a href="" target="_blank">Privacy</a><a href="" target="_blank">News</a></span>
<div class="container">
<div class="container-fluid">
<div class="row">
<div class="text-center col-sm-12 col-md-12">
<h1 class="text-hide center-block" id="main-logo">
<img class="center-block img-responsive" src="LOGO.webp" alt=""/>
<p class="text-muted">Redirect searches to Ethical Search Engines</p>
<div class="row">
<div class="text-center col-sm-12 col-md-12">
<form method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>" id="search_form" role="search">
<div class="input-group col-md-8 col-md-offset-2">
<input type="search" name="q" class="form-control input-lg autofocus" id="q" placeholder="Search here..." aria-label="Search here..." autocomplete="off" value="" accesskey="s">
<span class="input-group-btn">
<button type="submit" name="submit" class="btn btn-default input-lg" aria-label="Cerca"><span class="hide_if_nojs"><img src="search-icon.png"></span></button>
</form> </div>
<div class="footer">
<div class="container">
<p class="text-muted">
<small>By using this service you accept the <a href="" target="_blank">Terms</a><br>
<a href="" target="_blank">source code</a> | <a href="" target="_blank">issue tracker</a> | <a href="" target="_blank">support us</a> | <a href="" target="_blank">wiki</a></small>
if(isset($_POST['submit'])) {
$q = $_POST['q'];
goSearch($q, $searchsite);
function goSearch($q, $searchsite) {
$q = urlencode($q);
$idx = rand(1,sizeof($searchsite))-1;
$query = $searchsite[$idx].$q;
header('Location: '.$query);