Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Invoking Methods

Now that we’ve covered encapsulating values (a process generally known as marshaling), we can move on and cover the steps necessary to complete an entire call to an XML-RPC server. This section covers the xmlrpc_clientclass, which holds the URL of the XML-RPC server; the xmlrpcmsg class, which holds the XML-RPC payload; and the xmlrpcres class, which holds the data returned by the remote procedure call.

Preparing a Client Object

The first step in invoking a method involves initializing an xmlrpc_client object for the target XML-RPC server you wish to use. The xmlrpc_client constructor takes the following form:

$client=new xmlrpc_client($server_path, $server_hostname, $server_port);

  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint