decode($params);
$result = "{id:" . $id . ", 'result':'" . $p[0]. "', error:''}";
break;
case "postJsonRpc12Echo":
case "getJsonRpc12Echo":
case "postJsonRpc12EchoNamed":
case "getJsonRpc12EchoNamed":
$p = $json->decode($params);
if ($p->message){
$d = $p->message;
}else{
$d=$p[0];
}
$result = "{id:" . $id . ", 'result':'" . $d . "'}";
break;
default:
$result = "{id:'1','error':'Unknown Method', 'result':'this result only here for this test, shouldnt be here in real code'}";
break;
}
print $result;
?>