aboutsummaryrefslogtreecommitdiffstats
path: root/gemini-search.php
diff options
context:
space:
mode:
authorsillylaird <sillyfanboy@gmail.com>2026-09-03 00:33:59 +0000
committersillylaird <sillyfanboy@gmail.com>2026-09-03 00:33:59 +0000
commit898b52edcb47bcb3e9d6106e74ca73e74ea01e70 (patch)
tree85c6ee5ad58b860144551184d4cf86b560c62b91 /gemini-search.php
downloadwww-898b52edcb47bcb3e9d6106e74ca73e74ea01e70.tar.gz
www-898b52edcb47bcb3e9d6106e74ca73e74ea01e70.zip
import live www.sillylaird.ca webrootHEADmain
Diffstat (limited to 'gemini-search.php')
-rw-r--r--gemini-search.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/gemini-search.php b/gemini-search.php
new file mode 100644
index 0000000..e48f7a6
--- /dev/null
+++ b/gemini-search.php
@@ -0,0 +1,11 @@
+<?php
+// Redirects a query to Google Gemini (AI Mode) so the form posts to this site,
+// not directly to google.com.
+$q = trim($_GET['q'] ?? '');
+if ($q === '') {
+ header('Location: https://gemini.google.com/app');
+ exit;
+}
+$target = 'https://www.google.com/search?udm=50&q=' . urlencode($q);
+header('Location: ' . $target, true, 302);
+exit;