summaryrefslogtreecommitdiff
path: root/website/include/detect-os.inc.php
diff options
context:
space:
mode:
authorHenri Herscher <henri@oreka.org>2005-10-27 15:08:39 +0000
committerHenri Herscher <henri@oreka.org>2005-10-27 15:08:39 +0000
commite76fa0b3e203a5eeebc15eed92be79933bd94457 (patch)
tree6b007edae582fb67b69393c35544ed8bd96274ec /website/include/detect-os.inc.php
parent0fd6bacf4e3cf06208d3d0327672d9446094e0a6 (diff)
First checkin
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@18 09dcff7a-b715-0410-9601-b79a96267cd0
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";
+}
+?>