简体   繁体   中英

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/ ?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM