aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ogs/assetserver/index.php
diff options
context:
space:
mode:
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