Xmlrpc php help...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Aric_Holland
Forum Newbie
Posts: 5
Joined: Sat Aug 09, 2008 6:23 pm
Location: Maui, HI

Xmlrpc php help...

Post by Aric_Holland »

Hello :( ,

I have an java program that connects to an webserver and communicates with an php file through xmlrpc. I have the need for more functions and so I need a little help here to have my server process each request:

Code:

Code: Select all

 
 
function Login($xmlrpcmsg)
{
    $result = "Hi from the server, " . "Username: " . $xmlrpcmsg->getParam(0)->scalarVal() . " Password: " . $xmlrpcmsg->getParam(1)->scalarVal();
    return new xmlrpcresp(new xmlrpcval($result, "string"));
}
 
$s = new xmlrpc_server(array(
        "XmlRpcDemo.Login" => array(
            "function" => "Login",
            "signature" => $login_sig)
            ));
 
 
basically i need $s to point to different methods. Like and register method for instance. Let me show you by code example:

Code: Select all

 
$s = new xmlrpc_server(array(
              "XmlRpcDemo.Login" => array(
                                                     "function" => "Login",
                                                     "signature" => $login_sig))
              "XmlRpcDemo.Register" => array(
                                                    "function" => "Register",
                                                    "signature" => $login_sig)));
 
but that doesnt work you see? So how do I get this to work. Please help me!

Much Appreciated,

Aric Holland
Aric_Holland
Forum Newbie
Posts: 5
Joined: Sat Aug 09, 2008 6:23 pm
Location: Maui, HI

Re: Xmlrpc php help...

Post by Aric_Holland »

No one knows?? ...
Post Reply