Kamil
Kamil

Reputation: 13931

PHP application with Wordpress XMLRPC - how to start?

I need to write application in PHP that supports Wordpress XML-RPC and allows to add posts from that PHP application (other website) using XML-RPC.

  1. Where I can find some tutorial or examples of XML-RPC in PHP for newbies?

  2. Shall I use XMLRPCPHP from http://phpxmlrpc.sourceforge.net/?

Upvotes: 0

Views: 722

Answers (1)

In brief, xmlrpc is the method of remote procedure call, where call info is xml encoded.

xmlrpc server exposes a set of remote methods with input arguments and return type.

xmlrpc supports following argument types:

  • int integer value
  • double double-precision floating point value
  • boolean boolean value
  • string string value
  • dateTime date/time value
  • base64 base64 encoded binary data
  • array array of values
  • struct structure, where each member has name and value (similar to associative arrays)

Description of Wordpress methods exposed through xmlrpc

To add a post, you need to call wp.newPost with arguments: blog id, username, password and structure, representing post content.

XMLRPCPHP is a good choice.

Upvotes: 2

Related Questions