Implemented usersessions/ REST stuff

ogs-cs@86
gareth 2007-02-25 01:49:24 +00:00
parent bdcf1e91a8
commit cd9dbca058
1 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,27 @@
<?
error_reporting(E_ALL); // Remember kids, PHP errors kill XML-RPC responses and REST too! will the slaughter ever end?
include("../gridserver_config.inc.php");
include("../../common/database.inc.php");
// Parse out the parameters from the URL
$params = str_replace($grid_home,'', $_SERVER['REQUEST_URI']);
$params = str_replace("index.php/","",$params);
$params = split('/',$params);
// Die if the key doesn't match
if($params[1]!=$sim_recvkey) {
// die();
}
print_r($params);
// Send requested data
switch($params[0]) {
case 'getasset':
if($params[3]=="data") {
Header("Content-Length: ". (string)filesize($asset_repos . "/" . $params[2] . "/data"));
readfile($asset_repos . "/" . $params[2] . "/data");
}
break;
}
?>