url = $url; $ret->method = $method; $ret->arguments = $arguments; $ret->accept = $accept; return $ret; } $rest = handleREST($_SERVER,$_POST); $num = rand(3,9); $rest->number = $num; header("content-type: application/json"); echo json_encode($rest); exit; ?>