I am an experienced PHP programmer, familiar with CURL and using it with cookie jar file, and also comfortable with JSON.
What I am not familiar with is WordPress 4.1.1, and my goal is simple: remotely call a WordPress site either natively or by a plugin (hopefully natively), and:
a) submit an article/post and hopefully
b) get a list of posts by user sorted by date as well (to compare).
From research so far I see you need to be logged in, and perhaps it is a 2-step process including getting a nonce and then submitting the post with the nonce. Can anyone tell me where to look under API documentation, or where to start?
You could use the
XML-RPC API
to do this, here is an simple example usingcurl
which creates a new post usingwp.newPost
:To get a list of posts you may use
wp.getPosts
, although you cannot filter posts by author, you could loop through each post in the response and check if it should be displayed or not:I know enough about WP to know better than to use it.
But you do not need any of the stuff you are considering e.g. nonce, IXR, XML.
You write your own PHP script. I do not understand why you need a remote blog post tool when websites by their nature are remotely accessible. Like use a bookmark to your WP site.
I can see some possible uses for getting a list of posts.
Why would you need security to access posts that are there for the public to see?
Script on WP site:
Access from Browser:
Script accessed from remote PHP script:
If you do not want to save a copy of data in file