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.getRecentPosts',
\r
19 new xmlrpcval('1', 'string'), // blogid
\r
20 new xmlrpcval('god', 'string'), // username
\r
21 new xmlrpcval('heaven', 'string'), // password
\r
22 new xmlrpcval('5', 'int') // amount to get
\r
27 $c=new xmlrpc_client($serverPath, $serverHost, $serverPort);
\r
33 if (!$r->faultCode()) {
\r
37 print "Code: " . $r->faultCode() .
\r
38 " Reason '" .$r->faultString()."'<BR>";
\r