+$dse = "";
+if ( isset($_GET['dse']) and preg_match('/^[0-9a-z]{1,5}$/', $_GET['dse']) === 1 ) { // TODO: prevent injection, check whether dse is a valid searchengine
+ $dse = $_GET['dse'];
+}
+
+if ( isset($_GET['get']) and $_GET['get'] === "opensearchdescription" ) {
+ echo '<?xml version="1.0" encoding="UTF-8"?>
+<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
+<ShortName>consearch';
+ if ( $dse ) { echo " ($dse)"; }
+ echo '</ShortName>
+<Description>conveniently use different searchengines</Description>
+<Tags>consearch</Tags>
+<Contact>consearch @ f p u n k t k . de</Contact>
+<Url type="text/html" template="https://www.fpunktk.de/consearch/index.php';
+ if ( $dse ) { echo "?dse=$dse"; }
+ echo '#{searchTerms}" />
+<Image height="16" width="16" type="image/png">https://www.fpunktk.de/consearch/consearch.png</Image>
+</OpenSearchDescription>';
+
+ exit;
+}
+
+?>
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">