Services 3 and session authentication
Thank you very much for your help. I finally manage to autenticate and retrieve files from my rpc server. Here is my syntax in case anyone needs it.

// USER LOGIN
$authenticate = xmlrpc($settings['server'], Array('user.login' =&gt; array($settings['user'] , $settings['password']),));

// CREATE HEADERS
$options['headers']['Cookie'] = $authenticate['session_name'] . '=' . $authenticate['sessid'];

//RETRIEVE FILE
$file= xmlrpc($settings['server'], Array('file.retrieve' =&gt; Array(Array("fid"=&gt;$fid),Array("file_contents"=&gt; 'true'),Array("image_styles"=&gt;'true') )),$options);


EDIT: AFTER SERVICES 3.5 you should do:

// USER LOGIN
$authenticate = xmlrpc($settings['server'], Array('user.login' =&gt; array($settings['user'] , $settings['password']),));

// CREATE HEADERS
$options['headers']['Cookie'] = $authenticate['session_name'] . '=' . $authenticate['sessid'];

// GET TOKEN
$token = xmlrpc(url($this-&gt;endpoint, array('absolute' =&gt; TRUE)), array('user.token' =&gt; array()), $this-&gt;headers);

//INSERT TOKEN INTO HEADERS
$options['headers']['X-CSRF-Token'] = $token['token'];

//RETRIEVE FILE
$file= xmlrpc($settings['server'], Array('file.retrieve' =&gt; Array(Array("fid"=&gt;$fid),Array("file_contents"=&gt; 'true'),Array("image_styles"=&gt;'true') )),$options);