[eluser]skattabrain[/eluser]
my request ...
Code:
function customerlist()
{
$this->load->helper('url');
$this->load->library('xmlrpc');
$this->xmlrpc->server('mydomainhere.com/index.php/get_customer', 84);
$this->xmlrpc->method('Customerlist');
$this->xmlrpc->set_debug(TRUE);
$request = array('');
$this->xmlrpc->request($request);
if ( ! $this->xmlrpc->send_request())
{
echo $this->xmlrpc->display_error();
}
else
{
echo '<pre>';
print_r($this->xmlrpc->display_response());
echo '</pre>';
}
}
my server ...
Code:
class Get_customer extends Controller {
function index()
{
$this->load->library('xmlrpc');
$this->load->library('xmlrpcs');
$this->xmlrpc->set_debug(TRUE);
$config['functions']['Customer'] = array('function' => 'Get_customer.customer');
$config['functions']['Customerlist'] = array('function' => 'Get_customer.customerlist');
$this->xmlrpcs->initialize($config);
$this->xmlrpcs->serve();
}
function customerlist($request)
{
// This is a query via ODBC
$query = $this->db->query("SELECT * FROM AR_Customer");
// Give the request back
return $this->xmlrpc->send_response($query->result_array());
}
}