6314d36febdea4b82aeca0e5d9a0d05243f903b0
[consearch.git] / index.php
1 <?php
2 /*
3 consearch
4
5 Copyright (C) 2015 Felix Kästner, consearch @ f p u n k t k . de
6
7 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
10
11 You should have received a copy of the GNU General Public License along with this program; if not, see http://www.gnu.org/licenses/.
12 */
13
14 $consearch_name = "consearch";
15 $consearch_base_url = "https://fpunktk.de/consearch/";
16 $consearch_url = "$consearch_base_url" . "index.php";
17
18 $dse = ""; // default search engine
19 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
20     $dse = $_GET['dse'];
21 }
22 $browserintegration = "";
23 if ( isset($_GET['include']) and $_GET['include'] == "browserintegration" ) {
24     $browserintegration = "true";
25 }
26
27 if ( isset($_GET['get']) and $_GET['get'] === "opensearchdescription" ) {
28     header('Content-Type: text/xml');
29     echo '<?xml version="1.0" encoding="UTF-8"?>
30 <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
31 <ShortName>' . "$consearch_name";
32     if ( $dse ) { echo " ($dse)"; }
33     echo '</ShortName>
34 <Description>conveniently use different searchengines</Description>
35 <Tags>consearch</Tags>
36 <Contact>consearch @ f p u n k t k . de</Contact>
37 <Url type="text/html" template="' . "$consearch_url";
38     if ( $dse ) { echo "?dse=$dse"; }
39     echo '#{searchTerms}"></Url>
40 <Image height="16" width="16" type="image/png">' . "$consearch_base_url" . 'consearch.png</Image>
41 </OpenSearchDescription>
42 ';
43     exit;
44 }
45
46 ?>
47 <!DOCTYPE html>
48 <html>
49 <head>
50 <meta charset="UTF-8">
51 <meta http-equiv="content-type" content="text/html; charset=UTF-8">
52 <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
53 <meta name="referrer" content="no-referrer">
54 <title><?php echo "$consearch_name";?></title>
55 <link rel="icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAACMuuz63rNKAAAAK0lEQVQI12P4/58BiM4cZ9gdDUVnboNE/n8Hoc6JDLvLGLrLGF4DyWlAcQBYKBgvsgbJOAAAAABJRU5ErkJggg==" type="image/png">
56 <?php
57 if ( $browserintegration ) {
58     echo '<link rel="search" type="application/opensearchdescription+xml" href="index.php?get=opensearchdescription';
59     if ( $dse ) {
60         echo "&amp;dse=$dse";
61     }
62     echo '" title="' . "$consearch_name";
63     if ( $dse ) {
64         echo " ($dse)";
65     }
66     echo '">';
67     echo "\n";
68 }
69 ?>
70
71 <style type="text/css">
72 * {
73     font: 16pt monospace;
74     padding: 0px;
75     margin: 0px;
76 }
77 body {
78     color: #000000;
79     background-color: #8CBAEC;
80     text-align: center;
81     margin: 0ex auto 10mm;
82     padding: 0ex;
83     width: 96%;
84     max-width: 96%;
85 }
86 h1, h1 a {
87     font-size: 12pt;
88     font-weight: bold;
89     margin: 0.4ex;
90 }
91 input {
92     margin-bottom: 3mm;
93     width: 100%;
94     height: 13mm;
95 }
96 button {
97     margin: 0px -5px 3mm 0px; /* trbl */
98     padding: 3px;
99     background: none;
100     border: 1px solid black;
101     width: 13ex; /* 13ex 11ch */
102     width: 11ch; /* used twice because some browsers don't understand it */
103     height: 13mm;
104 }
105 img {
106     border: none;
107     margin: 0px;
108     padding: 0px;
109 }
110 </style>
111
112 <script type="text/javascript">
113
114 var b64images = new Object();
115 b64images["az.png"] = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQEAYAAABPYyMiAAAABmJLR0T///////8JWPfcAAAACXBIWXMAAABIAAAASABGyWs+AAACxklEQVRIx62Vy0/TQRDHf0BpES8gnkAKXjAYSIjhgAeMCf4VeMELBhMvJIAgUEBSD/QP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rynLr8vbs8/ftz3/w9vnx2pzx257x3KHy36jy9/nz4a325772+fv36cT36cX3+vv579T79OL79eP89uf8/f38/f79+vH9/v7++/X+/Pf+/Pj+/fn+/fr+/fv///8t5hX9AAAABHRSTlNaWuDgiHwzrgAAAAFiS0dEUg1gLZAAAACxSURBVBgZPcEHQsJQAAPQ0H6NAxXEvRCCW9xbcRdx4Mj9D2OLlveAiJzuuKd7EBcQheFl564Ug5xz342EQdZsfyfJy9vP54mEMHpm+1brG1t7TUkII6e2k/NmQz3gQNWZr+fL4zVJICvOPWxLIFlZ9b+7usBMaXal5VR3VyADM8UFp44EhuLU5MT42NCMU4cCOW+/P7UuXm1/7Ajkkvse60LERefa+4qBqHzvP9ebigu/AGwyxwJqEuAAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTUtMDUtMjJUMTg6MTk6NDArMDI6MDCIMpBxAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE1LTA1LTIyVDE4OjE5OjIzKzAyOjAwDug71wAAAABJRU5ErkJggg==";
124 b64images["uu.png"] = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQEAIAAADAAbR1AAAABnRSTlMAAAAAAABupgeRAAAABmJLR0T///////8JWPfcAAAACXBIWXMAAABIAAAASABGyWs+AAAAMklEQVQ4y2NgwAC/f3d3YyMh4NGj8HBsJAlg1IKBB1eukEOOWkCPOCAmjY1aMGoBLQAAutj8GeaBm/MAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTQtMDctMTFUMTc6MDU6NDcrMDI6MDComcnDAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDEzLTEwLTI4VDE2OjU2OjU0KzAxOjAwtaTRQQAAAABJRU5ErkJggg==";
125 b64images["wp.png"] = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAMFBMVEX8/fy5urlXWFdIR0ipqKl6e3rY2dhpammEg4QoKCjp6OmYmJgZGBnIx8gEAgQ8OjxFp+PiAAAACXBIWXMAAABIAAAASABGyW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0VgA0WQA0WgA0XAA0YgA1WgA1WwA1XQA1XwA2YwA3WwA4XAA4XwA4YwA5XQA5XgA6XAA6YwA6ZAA6ZgA6ZwA7XwA7cQA9aAA9bAA+aQA+awA+bQA+cAA+cQA/aQA/bAA/cQBAcQBBdABBdQBCaQBCdQBCdgBDbwBDdgBEcABEdwBEegBFcwBFdABFdQBFdgBFegBFewBGdgBGegBHeQBHegBIbwBIdwBIeABIegBIfQBJdQBJfABJfgBKeQBKfQBKfgBLfgBMfgBMgABMgQBNgABNggBOfABOfgBOgABOggBQgwBQhwBRhABRhgBShwBSiQBThgBThwBTiABUhwBUiwBViABVjQBWiwBWjABXiwBZjQBZkABajgBajwBckABdkQBflABhlgD///+5iBqqAAAA5ElEQVQY02NgAAExR3ZvLw42TjCHgVle0ClFWU1TJmlqiDADAyODRGVAqGrdJGtZ+/BZWUAFehMsSnOc+6uU4pvkglwZGFhbJ5ukzzeQVhFxX+hmqgtUoWgspaCl7VLjaWRoV9xixcDnGxHlJxQzo0jHsruhfHEhQ3XktLalsRrRtgHtU7M7OuMYAhclJ/RN9BBqbM+YkjuvS4BBvDa+vqLZR3JOT0fqkkQuoDsc8ubOzJ5ubjO7d0EBL9BZDOz6YWWZJVODDfNFWSBOZ2Di5lH3TzPjZ0ABy9hAypchCUAAAwYAADSePvz3Bi7CAAAAAElFTkSuQmCC";
133
134 <?php
135 // for f in *.ico; do for q in {0..100}; do convert -quality $q $f ${f%*.ico}$q.png; done; echo "b64images[\"${f%*.ico}.png\"] = \"$(base64 $(\ls -1S ${f%*.ico}*.png | tail -n 1) | tr -d '\n')\";"; done
136 // try optipng or pngcrush
137 // for f in *.png; do echo "b64images[\"${f}\"] = \"$(base64 $f | tr -d '\n')\";"; done > tmp.js
138 ?>
139
140 var se = new Object(); // object of search engines
141 // se["keyword"] = ["displayed name, max 7 chars", "url to which the querystring can be appended", "b64images name"];
142 se["ii"] = ["startpg", "https://www.startpage.com/do/search?query=", "sp.png"];
143 se["id"] = ["sp_de", "https://www.startpage.com/do/search?cmd=process_search&language=deutsch&with_language=lang_de&query=", "sp.png"];
144 se["wp"] = ["wp_de", "https://de.wikipedia.org/wiki/Spezial:Search?search=", "wp.png"];
145 se["wpe"] = ["wp_en", "https://en.wikipedia.org/wiki/Special:Search?search=", "wp.png"];
146 se["qq"] = ["qwant_l", "https://lite.qwant.com/?t=web&s=0&b=0&q=", ""];
147 se["qi"] = ["qw_img", "https://lite.qwant.com/?t=images&s=0&b=0&q=", ""];
148 se["dd"] = ["dd_go", "https://duckduckgo.com/html/?ka=n&kh=1&kl=wt-wt&kp=-1&kt=n&kv=1&ky=-1&q=", "dd.png"];
149 se["sx"] = ["searx", "https://searx.me/?q=", ""];
150 se["gg"] = ["google", "https://www.google.com/search?hl=de&safe=off&q=", "gg.png"];
151 se["wa"] = ["wolfram", "https://www.wolframalpha.com/input/?i=", ""];
152 se["si"] = ["sp_img", "https://startpage.com/do/search?cat=pics&query=", "sp.png"];
153 se["gi"] = ["gg_img", "https://www.google.com/images?hl=de&safe=off&q=", "gg.png"];
154 se["mg"] = ["metager", "https://metager.de/meta/meta.ger3?eingabe=", ""];
155 se["wb"] = ["wb", "http://www.woerterbuch.info/?query=", ""];
156 se["leo"] = ["leo", "https://dict.leo.org/german-english/", "leo.png"];
157 se["lg"] = ["linguee", "https://www.linguee.com/search?source=auto&query=", ""]
158 se["dc"] = ["dict.cc", "https://www.dict.cc/?s=", ""];
159 se["gt"] = ["gg_tl", "https://translate.google.de/?hl=de&tab=wT#en|de|", "gg.png"];
160 se["ud"] = ["ud", "http://www.urbandictionary.com/define.php?term=", "ud.png"];
161 se["osm"] = ["osm", "https://www.openstreetmap.org/?query=", "osm.png"];
162 se["gm"] = ["g-maps", "https://www.google.de/maps/preview?hl=de&q=", "gm.png"];
163 se["uu"] = ["uu_wiki", "http://wiki.ubuntuusers.de/", "uu.png"];
164 se["man"] = ["u_man", "http://manpages.ubuntu.com/cgi-bin/search.py?ie=UTF-8&titles=Title&q=", "man-u.png"];
165 se["dps"] = ["deb-pkg", "https://packages.debian.org/search?searchon=names&suite=all&section=all&keywords=", ""];
166 se["ups"] = ["uu-pkg", "http://packages.ubuntu.com/search?searchon=names&suite=all&section=all&keywords=", "man-u.png"];
167 se["fps"] = ["fed-pkg", "https://apps.fedoraproject.org/packages/s/", ""];
168 se["lps"] = ["lnxpkgs", "https://pkgs.org/download/", ""];
169 se["fd"] = ["f-droid", "https://search.f-droid.org/?q=", ""];
170 se["yt"] = ["youtube", "https://www.youtube.com/results?search_query=", "yt.png"];
171 se["imdb"] = ["imdb", "http://www.imdb.com/find?s=all&q=", "imdb.png"];
172 se["az"] = ["amazon", "https://www.amazon.de/s/?url=search-alias%3Daps&field-keywords=", "az.png"];
173 se["php"] = ["php.net", "http://de2.php.net/manual-lookup.php?lang=de&pattern=", "php.png"];
174 se["sh"] = ["slfhtml", "https://wiki.selfhtml.org/index.php?search=", "sh.png"];
175 se["down"] = ["down", "http://www.downforeveryoneorjustme.com/", "down.png"];
176 se["fefe"] = ["fefe", "https://blog.fefe.de/?q=", ""];
177 se["wtr"] = ["wtr-ol", "http://www.wetteronline.de/?searchpcid=pc_city_weather&searchpid=p_city_weather&pid=p_search&searchstring=", ""];
178 se["wtrc"] = ["wtr.com", "http://www.wetter.com/suche/?o=location&q=", ""];
179 se["gh"] = ["github", "https://github.com/search?utf8=✓&q=", ""];
180 se["bb"] = ["bing", "https://www.bing.com/search?q=", ""];
181 se["mdn"] = ["mdn", "https://developer.mozilla.org/search?q=", ""];
182 se["ctan"] = ["ctan", "http://ctan.org/search/?phrase=", ""];
183 se["so"] = ["stck-of", "http://stackoverflow.com/search?q=", ""];
184 se["gpg"] = ["pgp.mit", "https://pgp.mit.edu/pks/lookup?op=index&fingerprint=on&search=", ""];
185 se["amo"] = ["amo", "https://addons.mozilla.org/search/?q=", ""];
186 se["gsm"] = ["gsm", "http://www.gsmarena.com/results.php3?sQuickSearch=yes&sName=", ""];
187 se["ck"] = ["chfkch", "http://www.chefkoch.de/suche.php?wo=2&suche=", ""];
188 se["ye"] = ["you-eng", "https://youglish.com/search/", ""];
189 se["ks"] = ["ks", "https://kraut.space/start?do=search&id=", "ks.png"];
190 se["obi"] = ["obi", "https://www.obi.de/search/", ""];
191 se["ikea"] = ["ikea", "https://www.ikea.com/de/de/search/?query=", ""];
192 se["it"] = ["i-tanke", "https://ich-tanke.de/suche/?q=", ""]
193 se["ct"] = ["clv-tkn", "https://www.clever-tanken.de/tankstelle_liste?spritsorte=7&r=10&ort=", ""]
194 se["tp"] = ["tankstp", "https://www.tankstellenpreise.de/suche.html?sorte=2&u=10&s=1&o=", ""]
195 se["ost"] = ["ost", "https://www.opensubtitles.org/en/search2/sublanguageid-eng/moviename-", ""];
196
197 function display_searchbuttons() {
198     document.getElementById("searchbuttons").innerHTML = "";
199     for ( kw in se ) {
200         document.getElementById("searchbuttons").innerHTML += '<button type="button" title="' + kw + '" value="' + se[kw][0] + '" onclick=\'location.href="' + se[kw][1] + '" + document.getElementById("querystring").value\'><img src="data:image/png;base64,' + b64images[se[kw][2]] + '" alt="">&nbsp;' + se[kw][0] + "</button> \n";
201     }
202 }
203
204 function parse_fragmentstring() {
205     var fragmentstring = document.URL.substr( document.URL.split("#")[0].length + 1 );
206     if ( fragmentstring == "" ) {
207         var fragmentstring = document.URL.substr( document.URL.split("consearchterm=")[0].length + 14 );
208     }
209     if ( fragmentstring == "" ) {
210         display_searchbuttons();
211         document.getElementById("querystring").focus();
212     } else {
213         fragmentarr = fragmentstring.replace("%20", "+").split("+");
214         kw = fragmentarr[0];
215         if ( se[kw] ) {
216             // first word in query is a search engine keyword
217             fragmentarr.shift();
218             location.href = se[kw][1] + fragmentarr.join(" ");
219         } else {
220 <?php
221 if ( $dse ) {
222     // use a default searchengine
223     echo '            if ( kw != "nd" ) {
224                 location.href = se["' . $dse . '"][1] + fragmentarr.join(" ");
225             } else {
226                 fragmentarr.shift();
227                 document.getElementById("querystring").value = fragmentarr.join(" ");
228                 display_searchbuttons();
229             }
230 ';
231 } else {
232     // display all buttons and write the fragmentstring into the querystring input
233     echo '            document.getElementById("querystring").value = fragmentarr.join(" ");
234             display_searchbuttons();
235 ';
236 }
237 ?>
238         }
239     }
240 }
241 </script>
242
243 </head>
244
245 <body onload="parse_fragmentstring();">
246
247 <h1><a href="./"><?php echo "$consearch_base_url";?></a></h1>
248
249 <noscript>
250 <p style="color: red; font-size: 200%; font-weight: bold;">please enable javascript</p>
251 </noscript>
252
253 <?php
254 if ( $browserintegration ) {
255     // hide input and searchbuttons
256     echo '<div style="display: none;">' . "\n";
257 }
258 ?>
259
260 <div><label><input id="querystring" type="text"></label></div>
261
262 <div id="searchbuttons"></div>
263
264 <p><a href="?include=browserintegration">add to browser</a></p>
265
266 <?php
267 if ( $browserintegration ) {
268     echo "</div>
269
270 <div style='text-align: left;'>
271 <p>Add $consearch_name to your browser:</p>
272 <ul style='margin: 0.5ex 2ex'>
273 <li>In firefox desktop this is done via the search bar or the ⋯-button in the address bar.</li>
274 <li>In firefox for android: Go to settings → search → add search engine → other, add a name (like $consearch_name) and the url '$consearch_url#%s'</li>
275 <li>
276     If this does not work then $consearch_name can perhaps be added via the following form (right-click the input and select 'Add a Keyword for this Search...'), but this will send all queries to the server and is therefore not recommended.
277     <form method=\"GET\" action=\"./\">";
278     if ( $dse ) { echo "
279         <input type=\"hidden\" name=\"dse\" value=\"$dse\">"; }
280         echo '
281         <input type="text" name="consearchterm" value="">
282     </form>
283 </li>
284 </ul>
285 </div>
286 ';
287 }
288 ?>
289
290 <p><a href="https://fpunktk.de/gitweb/?p=consearch.git;a=summary">about</a> | <a href="https://fpunktk.de/#kontakt">contact</a></p>
291
292 </body>
293 </html>
294