XmlRPC SERVER |
class Xmlrpcs_lib extends CI_Controller {
function __construct() {
parent::__construct();
}
function index() {
$this->load->library('xmlrpc');
$this->load->library('xmlrpcs');
$config['functions']['Greetings'] = array('function' => 'Xmlrpcs_lib.process');
$this->xmlrpcs->initialize($config);
$this->xmlrpcs->serve();
}
function process($request)
{
$parameters = $request->output_parameters();
$response = array(
array(
'you_said' => $parameters['0'],
'i_respond' => 'Not bad at all.'),
'struct'
);
return $this->xmlrpc->send_response($response);
}
}
|