Get comment data
WordPress 2.7+
<methodCall> <methodName>wp.getComment</methodName> <params> <param> <value> <string>1</string> </value> </param> <param> <value> <string>xmlrpc-example</string> </value> </param> <param> <value> <string>example-password</string> </value> </param> <param> <value> <int>8</int> </value> </param> </params> </methodCall>
<methodResponse> <params> <param> <value> <struct> <member> <name>date_created_gmt</name> <value> <dateTime.iso8601>20081121T02:54:08</dateTime.iso8601> </value> </member> <member> <name>user_id</name> <value> <string>1</string> </value> </member> <member> <name>comment_id</name> <value> <string>8</string> </value> </member> <member> <name>parent</name> <value> <string>0</string> </value> </member> <member> <name>status</name> <value> <string>approve</string> </value> </member> <member> <name>content</name> <value> <string>More (http://msdn.microsoft.com/en-us/library/aa752574(VS.85).aspx) tests.</string> </value> </member> <member> <name>link</name> <value> <string>http://example.com/?p=1#comment-8</string> </value> </member> <member> <name>post_id</name> <value> <string>1</string> </value> </member> <member> <name>post_title</name> <value> <string>Link Test</string> </value> </member> <member> <name>author</name> <value> <string>xmlrpc-example</string> </value> </member> <member> <name>author_url</name> <value> <string>http://example.com/</string> </value> </member> <member> <name>author_email</name> <value> <string>example@example.com</string> </value> </member> <member> <name>author_ip</name> <value> <string>127.0.0.1</string> </value> </member> <member> <name>type</name> <value> <string></string> </value> </member> </struct> </value> </param> </params> </methodResponse>
<?php require "./IXR_Library.inc.php"; $rpc = new IXR_Client( "http://example.com/xmlrpc.php" ); $status = $rpc->query( "wp.getComment", // method name "1", // blog id "xmlrpc-example", // username "example-password", // password 1 // comment id ); if( !$status ) { print "Error ( " . $rpc->getErrorCode( ) . " ) : "; print $rpc->getErrorMessage( ) . "\n"; exit; } $data = $rpc->getResponse( ); print_r( $data );