aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ogs/assetserver/index.php
diff options
context:
space:
mode:
authorgareth2007-02-27 23:31:14 +0000
committergareth2007-02-27 23:31:14 +0000
commited4dc30dc2b00628a3d6c298b6b2d6ec7f74ab56 (patch)
treec96e74cc05e4c6d6e97716c0c509fb0ec1693fc6 /ogs/assetserver/index.php
parentBrought in code from branches/gareth (diff)
downloadopensim-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 'ogs/assetserver/index.php')
-rw-r--r--ogs/assetserver/index.php24
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<?
2error_reporting(0); // Remember kids, PHP errors kill XML-RPC responses and REST too! will the slaughter ever end?
3
4include("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
11if($params[1]!=$sim_recvkey) {
12 die();
13}
14
15// Send requested data
16switch($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