diff options
author | Henri Herscher <henri@oreka.org> | 2005-10-27 15:08:39 +0000 |
---|---|---|
committer | Henri Herscher <henri@oreka.org> | 2005-10-27 15:08:39 +0000 |
commit | e76fa0b3e203a5eeebc15eed92be79933bd94457 (patch) | |
tree | 6b007edae582fb67b69393c35544ed8bd96274ec /website/include/detect-os.inc.php | |
parent | 0fd6bacf4e3cf06208d3d0327672d9446094e0a6 (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.php | 18 |
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"; +} +?> |