Posting to wordpress using php cli and xmlrpc
A reader once asked me if I could build a command line tool which takes title from one file, and content from another file to create wordpress post. I tried, which finally gave an outline to this script. I dont think that this is very high fly, but for those whom the xmlrpc is mumbo, this might be somthing worth looking into.
The requests are encoded into xml format using xmlrpc_encode_request, and responses are decoded using xmlrpc_decode. The response is tested using xmlrpc_is_fault. The transport is handled using curl methods. Sorry I am poor at code commenting.
Those who are trying the code, please dont forget to check and customize the configuration which is on line 129 for the login details, and line 26-33, where the categories are cached into the system.
Download the files: XML WpPost (411)

Can´t download XML WpPost.
And is there an example, how to use?
Petra
I think it is due to some browsers or some other network problems, that the content is opened in the browser. Just try right click and choose save link as.
Kinda silly question but How should I put the categories on lines 26-33?
@Awmen
Ok, it resulted that I haven’t installed php5-curl and php5-xmlrpc now the script works and posts get published but all of them goes to Uncategorized instead of the category I tell the script, additionally I get this error when executing the script:
PHP Warning: xmlrpc_is_fault() expects parameter 1 to be array, integer given in xml_wppost.php on line 54@Awmen I think you are passing the category as string, it should be passed as array, and the categories should exist. I got the same some time back when I tried to post to a non existent category
I have a php website that integrates wordpress – using it as a blog.
I want to use websites comments code and database to collect comments,
but when I use wp-comments-post.php, it goes to the blog pages.
I am not fully understanding your query, though I do think that you need to collect feedback, but don’t wish to publish that on the post page. In that case you need to edit the templates, such that the comments form is shown, but approved comments are not displayed.