--- /dev/null
+<?php\r
+/*\r
+ Test call to the nucleus XML-RPC server sending a metaWeblog.getRecentPosts request\r
+ \r
+ Wouter Demuynck / 2003-08-31\r
+*/\r
+\r
+// URL of XML-RPC server\r
+$serverHost = 'localhost';\r
+$serverPort = 8080;\r
+$serverPath = '/nucleus/nucleus/xmlrpc/server.php';\r
+ \r
+include('../../config.php');\r
+include($DIR_LIBS . 'xmlrpc.inc.php');\r
+\r
+$f=new xmlrpcmsg(\r
+ 'metaWeblog.editPost',\r
+ array(\r
+ new xmlrpcval('2', 'string'), // itemid\r
+ new xmlrpcval('god', 'string'), // username\r
+ new xmlrpcval('heaven', 'string'), // password\r
+ new xmlrpcval( // post info\r
+ array(\r
+ 'description' => new xmlrpcval('Just a test','string'),\r
+ 'title' => new xmlrpcval('Edit Post Test', 'string')\r
+/* 'categories' => new xmlrpcval(array(new xmlrpcval('General','string')), 'array')*/\r
+ ),'struct'),\r
+ new xmlrpcval(1, 'boolean'), // publish\r
+ )\r
+ );\r
+ \r
+ $c=new xmlrpc_client($serverPath, $serverHost, $serverPort);\r
+ $c->setDebug(1);\r
+ $r=$c->send($f);\r
+ $v=$r->value();\r
+\r
+\r
+ if (!$r->faultCode()) {\r
+ echo 'success!';\r
+ } else {\r
+ print "Fault: ";\r
+ print "Code: " . $r->faultCode() . \r
+ " Reason '" .$r->faultString()."'<BR>";\r
+ }\r
+ \r
+\r
+ \r
+?>
\ No newline at end of file