diff options
author | gareth | 2007-02-27 23:31:14 +0000 |
---|---|---|
committer | gareth | 2007-02-27 23:31:14 +0000 |
commit | ed4dc30dc2b00628a3d6c298b6b2d6ec7f74ab56 (patch) | |
tree | c96e74cc05e4c6d6e97716c0c509fb0ec1693fc6 /ogs/assetserver/index.php | |
parent | Brought in code from branches/gareth (diff) | |
download | opensim-SC_OLD-ed4dc30dc2b00628a3d6c298b6b2d6ec7f74ab56.zip opensim-SC_OLD-ed4dc30dc2b00628a3d6c298b6b2d6ec7f74ab56.tar.gz opensim-SC_OLD-ed4dc30dc2b00628a3d6c298b6b2d6ec7f74ab56.tar.bz2 opensim-SC_OLD-ed4dc30dc2b00628a3d6c298b6b2d6ec7f74ab56.tar.xz |
Brought in other OGS server components and the all-important caffeine script
Diffstat (limited to '')
-rw-r--r-- | ogs/assetserver/index.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/ogs/assetserver/index.php b/ogs/assetserver/index.php new file mode 100644 index 0000000..82cf9d4 --- /dev/null +++ b/ogs/assetserver/index.php | |||
@@ -0,0 +1,24 @@ | |||
1 | <? | ||
2 | error_reporting(0); // Remember kids, PHP errors kill XML-RPC responses and REST too! will the slaughter ever end? | ||
3 | |||
4 | include("assetserver_config.inc.php"); | ||
5 | |||
6 | // Parse out the parameters from the URL | ||
7 | $params = str_replace($asset_home,'', $_SERVER['REQUEST_URI']); | ||
8 | $params = split('/',$params); | ||
9 | |||
10 | // Die if the key doesn't match | ||
11 | if($params[1]!=$sim_recvkey) { | ||
12 | die(); | ||
13 | } | ||
14 | |||
15 | // Send requested data | ||
16 | switch($params[0]) { | ||
17 | case 'getasset': | ||
18 | if($params[3]=="data") { | ||
19 | Header("Content-Length: ". (string)filesize($asset_repos . "/" . $params[2] . "/data")); | ||
20 | readfile($asset_repos . "/" . $params[2] . "/data"); | ||
21 | } | ||
22 | break; | ||
23 | } | ||
24 | ?> \ No newline at end of file | ||