summaryrefslogtreecommitdiff
path: root/website/include/detect-os.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'website/include/detect-os.inc.php')
-rw-r--r--website/include/detect-os.inc.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/website/include/detect-os.inc.php b/website/include/detect-os.inc.php
new file mode 100644
index 0000000..32b8e58
--- /dev/null
+++ b/website/include/detect-os.inc.php
@@ -0,0 +1,18 @@
+<?php
+/*
+ * Copyright 2004 Matt Brubeck
+ * This file is licensed under a Creative Commons license:
+ * http://creativecommons.org/licenses/by/2.0/
+ */
+
+// Guess which download to offer, based on the user's OS.
+function which_download() {
+ $useragent = $_SERVER["HTTP_USER_AGENT"];
+ if (eregi("Mac", $useragent))
+ return "mac";
+ else if (eregi("X11", $useragent))
+ return "source";
+ else
+ return "windows";
+}
+?>