This example should also work fine for 6.1

Follow the instructions as for XMLRPC Server except install and enable REST Server. It does not provide any permissions on its own.

REST Server expects all parameters to be passed in the URL hence the code for using REST based services is a bit different from XMLRPC Server. You need to know the named of the service parameters (uid in user.get)

$domain = 'example.com';
$timestamp = (string) time();
$nonce = user_password();
$hash = hash_hmac('sha256', $timestamp .';'.$domain .';'. $nonce .';'.'user.get', 'remote_api_key', 0);
//Note that we are using domain_time_stamp not timestamp and domain_name not domain here
$request_url = $domain.'/method=user.get&uid=0&hash='.$hash.'&domain_name='.$domain.'&domain_time_stamp='.$timestamp.'&nonce='.$nonce;
$session = curl_init($request_url);
curl_setopt($session, CURLOPT_POST, 1); // Do a regular HTTP POST
curl_setopt($session, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($session, CURLOPT_HEADER, FALSE);
curl_setopt($session, CURLOPT_RETURNTRANSFER, TRUE);
$result = curl_exec($session);
$error = curl_error($session);
curl_close($session);
if (!empty($error)) {
  print '<pre>'.$error.'</pre>';
}
else {
  print '<pre>'.$result.'</pre>';
}

The code above will:
1. return error code if there was something wrong with the curl request (for example if the url does not exist)
2. return xml if the curl request was successful. This does necessarily mean that the curl request returned a valid result set.
<status>error</status> means there was an error with the service request.
<status>success</status> means the service request was successful.