aboutsummaryrefslogtreecommitdiffstats
path: root/sitemap.php
diff options
context:
space:
mode:
authorlolcat <will@lolcat.ca>2025-08-11 01:55:15 +0000
committerlolcat <will@lolcat.ca>2025-08-11 01:55:15 +0000
commitcdf958d29333d448f4521f4d2faa2592b58e9b27 (patch)
tree528f2a0ffa789a6f4279d9f54a4a2aaf391f390f /sitemap.php
downloadshittyweb-search-cdf958d29333d448f4521f4d2faa2592b58e9b27.tar.gz
shittyweb-search-cdf958d29333d448f4521f4d2faa2592b58e9b27.tar.bz2
shittyweb-search-cdf958d29333d448f4521f4d2faa2592b58e9b27.zip
fix wikipedia crashgrafted
Diffstat (limited to 'sitemap.php')
-rw-r--r--sitemap.php35
1 files changed, 35 insertions, 0 deletions
diff --git a/sitemap.php b/sitemap.php
new file mode 100644
index 0000000..80bda66
--- /dev/null
+++ b/sitemap.php
@@ -0,0 +1,35 @@
+<?php
+
+header("Content-Type: application/xml");
+include "data/config.php";
+
+$domain =
+ htmlspecialchars(
+ (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on" ? "https" : "http") .
+ '://' . $_SERVER["HTTP_HOST"]
+ );
+
+echo
+ '<?xml version="1.0" encoding="UTF-8"?>' .
+ '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' .
+ '<url>' .
+ '<loc>' . $domain . '/</loc>' .
+ '<lastmod>2023-07-31T07:56:12+03:00</lastmod>' .
+ '</url>' .
+ '<url>' .
+ '<loc>' . $domain . '/about</loc>' .
+ '<lastmod>2023-07-31T07:56:12+03:00</lastmod>' .
+ '</url>' .
+ '<url>' .
+ '<loc>' . $domain . '/instances</loc>' .
+ '<lastmod>2023-07-31T07:56:12+03:00</lastmod>' .
+ '</url>' .
+ '<url>' .
+ '<loc>' . $domain . '/settings</loc>' .
+ '<lastmod>2023-07-31T07:56:12+03:00</lastmod>' .
+ '</url>' .
+ '<url>' .
+ '<loc>' . $domain . '/api.txt</loc>' .
+ '<lastmod>2023-07-31T07:56:12+03:00</lastmod>' .
+ '</url>' .
+ '</urlset>';