Welcome Guest, Not a member yet? Register   Sign In
sample xml-rpc code
#5

[eluser]gtech[/eluser]
OK I assume you have the client and server example working

in the server code you can map XMLRPC calls to any function in any controller,
Code:
$config['functions']['Greetings'] = array('function' => 'Xmlrpc_server.process');
$config['functions']['Another'] = array('function' => 'Another_controller.functionname');
the example above uses Xmlrpc_server.process ... Xmlrpc_server being the controller name and process being the function.

if you want to shield the function from the webbrowser you can use an underscore before the function name

Xmlrpc_server._process

or

Another_controller._anotherfunction

Code:
......
    $config['functions']['Greetings'] = array('function' => 'Xmlrpc_server._process');
......        

    function _process($request)
    {
      //this function is only callable from XMLRPC interface.
......
?>

does that help?


Messages In This Thread
sample xml-rpc code - by El Forum - 05-26-2008, 01:58 AM
sample xml-rpc code - by El Forum - 05-26-2008, 02:07 AM
sample xml-rpc code - by El Forum - 05-26-2008, 06:31 AM
sample xml-rpc code - by El Forum - 05-26-2008, 05:21 PM
sample xml-rpc code - by El Forum - 05-26-2008, 06:58 PM



Theme © iAndrew 2016 - Forum software by © MyBB