diff options
author | gareth | 2007-03-07 19:08:00 +0000 |
---|---|---|
committer | gareth | 2007-03-07 19:08:00 +0000 |
commit | f2ea796ba8d73c8f25310edfa04b6b58f43cd412 (patch) | |
tree | 058efa2859a6d3c5ee51d4ff8455202fbaf9d79a /ogs/assetserver/index.php | |
parent | fixed last screwup (diff) | |
download | opensim-SC_OLD-f2ea796ba8d73c8f25310edfa04b6b58f43cd412.zip opensim-SC_OLD-f2ea796ba8d73c8f25310edfa04b6b58f43cd412.tar.gz opensim-SC_OLD-f2ea796ba8d73c8f25310edfa04b6b58f43cd412.tar.bz2 opensim-SC_OLD-f2ea796ba8d73c8f25310edfa04b6b58f43cd412.tar.xz |
Added OGS
Diffstat (limited to '')
-rw-r--r-- | ogs/assetserver/index.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/ogs/assetserver/index.php b/ogs/assetserver/index.php new file mode 100644 index 0000000..ee20229 --- /dev/null +++ b/ogs/assetserver/index.php | |||
@@ -0,0 +1,25 @@ | |||
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 = str_replace("index.php/","",$params); | ||
9 | $params = split('/',$params); | ||
10 | |||
11 | // Die if the key doesn't match | ||
12 | if($params[1]!=$sim_recvkey) { | ||
13 | die(); | ||
14 | } | ||
15 | |||
16 | // Send requested data | ||
17 | switch($params[0]) { | ||
18 | case 'getasset': | ||
19 | if($params[3]=="data") { | ||
20 | Header("Content-Length: ". (string)filesize($asset_repos . "/" . $params[2] . "/data")); | ||
21 | readfile($asset_repos . "/" . $params[2] . "/data"); | ||
22 | } | ||
23 | break; | ||
24 | } | ||
25 | ?> | ||