log(__FILE__, $requestMethod); /* $logger->log(__FILE__, "GET-Variabeles:"); while ( list($key, $value) = each($_GET) ) { $logger->log(__FILE__, $key . " : " . $value);; } $logger->log(__FILE__, "POST-Variabeles:"); while ( list($key, $value) = each($_POST) ) { $logger->log(__FILE__, $key . " : " . $value);; } */ $logger->log(__FILE__,"Redirect-URL:".$_SERVER["REDIRECT_URL"]); // extract REST request $req_type = $_SERVER["REQUEST_METHOD"]; $redirect_url = $_SERVER["REDIRECT_URL"]; $request = preg_replace("/.*rest\//", "", $redirect_url); // extract input stream $data = file_get_contents("php://input"); $logger->log(__FILE__,"Input data:".$data); // call implementation require_once 'REST/ProcessREST.php'; try { $result = ProcessREST::doIt($req_type, $request, $data); } catch (Exception $e) { $logger->logException(__FILE__, $e); $result = "Error occurred!"; } echo $result;