3 Test call to the nucleus XML-RPC server sending a metaWeblog.getRecentPosts request
\r
5 Wouter Demuynck / 2003-08-31
\r
8 // URL of XML-RPC server
\r
9 $serverHost = 'localhost';
\r
11 $serverPath = '/nucleus/nucleus/xmlrpc/server.php';
\r
13 include('../../config.php');
\r
14 include($DIR_LIBS . 'xmlrpc.inc.php');
\r
17 'metaWeblog.editPost',
\r
19 new xmlrpcval('2', 'string'), // itemid
\r
20 new xmlrpcval('god', 'string'), // username
\r
21 new xmlrpcval('heaven', 'string'), // password
\r
22 new xmlrpcval( // post info
\r
24 'description' => new xmlrpcval('Just a test','string'),
\r
25 'title' => new xmlrpcval('Edit Post Test', 'string')
\r
26 /* 'categories' => new xmlrpcval(array(new xmlrpcval('General','string')), 'array')*/
\r
28 new xmlrpcval(1, 'boolean'), // publish
\r
32 $c=new xmlrpc_client($serverPath, $serverHost, $serverPort);
\r
38 if (!$r->faultCode()) {
\r
42 print "Code: " . $r->faultCode() .
\r
43 " Reason '" .$r->faultString()."'<BR>";
\r