Hi all,

Firstly, let me apologize for the length of this post...

this is probably an easy problem to sort out, but its giving me endless

I have an already existing PHP application that I'm wrapping xmlrpc within -
rather than rewrite the application to natively use phprpcxml I've simply
created a skeleton, then included the appropriate PHP files from the
existing application - the only modifications being that these PHP scripts
do not output HTML - rather they simply populate arrays, for me to
manipulate later.

The problem I have is that I ahve several multidimensional arrays:
here are the examples:

        $user[1] = array("name" => "lee",
                                "pass" => "password",
                                "age" => "24");

        $user[2] = array("name" => "jim",
                             "pass" => "linux",
                             "age" => "20");

        $comment[1] = array("title" => "help",
                                   "owner" => "lee",
                                   "body" => "help me - I'm stuck with xmlrpc");

        $comment[2] = array("title" => "test",
                                  "owner" => lee",
                                  "body" => "just a test message");

        $url[1] = array("url" => "http://www.slashdot.org";,
                             "category" => "open source",
                             "date" => "2001-01-01");

        $url[2] = array("url" => "http://www.linux.com";,
                            "category" => "open source",
                            "data" => "2001-01-01");

I'm wanting to return these arrays ($user, $comment, $url) to the client
using xmlrpc - with WDDX I'd simple do:
 $packet = wddx_serialize_vars("user", "comment", "url");
 echo $packet;

And on the client side...

 (after code to retrieve the packet)
 $data = wddx_deserialize($packet);
 $user = $data["user"];
 $comment = $data["comment"];
 $url = $data["url"];

>From there I can iterate through each array and manipulate as usual.

I don't know whether in phpxmlrpc these should all be turned into a single
struct, or returned as multiple arrays, or what... its very confusing :-/

Can anybody show me an example (with explanation) of how I can achieve the
same (both client and server side) using phpxmlrpc?

Thanks in advance.

Lee Bolding
TrafficManager - Advertising Inventory Auctions

For information about how to subscribe and unsubscribe from this list
visit http://xmlrpc.usefulinc.com/list.html

Reply via email to