Skip to main content
added 747 characters in body
Source Link

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' => array($settings['user'] , $settings['password']),));

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

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

EDIT: AFTER SERVICES 3.5 you should do:

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

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

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

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

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

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' => array($settings['user'] , $settings['password']),));

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

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

         

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' => array($settings['user'] , $settings['password']),));

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

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

EDIT: AFTER SERVICES 3.5 you should do:

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

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

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

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

//RETRIEVE FILE
$file= xmlrpc($settings['server'], Array('file.retrieve' => Array(Array("fid"=>$fid),Array("file_contents"=> 'true'),Array("image_styles"=>'true') )),$options);
         
Fix typo
Source Link
David Thomas
  • 21.9k
  • 2
  • 33
  • 68

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' => array($settings['user'] , $settings['password']),));

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

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

         

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' => array($settings['user'] , $settings['password']),));

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

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

         

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' => array($settings['user'] , $settings['password']),));

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

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

         
added 36 characters in body
Source Link
Citricguy
  • 7.9k
  • 10
  • 58
  • 104

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' => array($settings['user'] , $settings['password']),));

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

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

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

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

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

         

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' => array($settings['user'] , $settings['password']),));

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

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

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' => array($settings['user'] , $settings['password']),));

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

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

         
Source Link
Loading