Posting via HTTP requests?
the XML-RPC protocol can do that for you, look up how to use it with curl: http://shoaibmir.wordpress.com/2009/03/10/using-curl-for-xmlrpc-calls/ and what the actual tags are: http://codex.wordpress.org/XML-RPC_Support
the XML-RPC protocol can do that for you, look up how to use it with curl: http://shoaibmir.wordpress.com/2009/03/10/using-curl-for-xmlrpc-calls/ and what the actual tags are: http://codex.wordpress.org/XML-RPC_Support
Since you have shell access, you could use wp-cli: wp eval-file your-posting-script.php
How complex do you want the example to be? This outputs “Hello”. $client = new WP_HTTP_IXR_Client(‘http://example.com/xmlrpc.php’); $client->query(‘demo.sayHello’); echo $client->getResponse(); This outputs “9”. $client = new WP_HTTP_IXR_Client(‘http://example.com/xmlrpc.php’); $client->query(‘demo.addTwoNumbers’, 4, 5); echo $client->getResponse(); This gets the WordPress version: $client = new WP_HTTP_IXR_Client(‘http://example.com/xmlrpc.php’); $client->query(‘wp.getOptions’, 0, ‘username’, ‘password’, ‘software_version’); $response = $client->getResponse(); echo $response[‘software_version’][‘value’]; Source: Me, 4 years ago: … Read more
This is an annoying problem, but there is a way to get the correct link if I do: $my_page_ask = array( ‘link’, ‘guid’ ); $params = array(0,$username,$password,$my_page_id, $my_page_ask); $clientresult = $client->query(‘wp.getPost’, $params); $post = $client->getResponse(); The string link contains the correct permalink if: $my_page[“post_status”] = “publish”; It doesn’t work on draft and the string guid … Read more
Try python-wordpress-xmlrpc. See documentation and GitHub repository. I haven’t tested it for myself, but it looks promising.
No, that option does not currently exist through XML-RPC. However, you can always create your own method in a plugin and hook it up to XML-RPC. Update There’s an upcoming Google Summer of Code project that will be extending the XML-RPC interface to allow direct manipulation of themes, so I won’t give away code to … Read more
Probably because your post is saved as draft. Try to set the post status to publish inside your $content array. E.g. $content[‘post_status’] = ‘publish’;
According to this ticket: Cannot serialize object wrapping 3rd party library structs. Must serialize the xml (to a string) and store that to session and reload the xml when restoring from session When you are storing object in transient it gets serialized and not all objects are capable of that correctly. Store textual XML data … Read more
You shouldn’t delete that file – it will be restored after update – so deleting it makes no sense (and it shouldn’t be treated as security fix). You can disable XMLRPC using filter: add_filter(‘xmlrpc_enabled’, ‘__return_false’); And even block access to that file. Below code for Apache (sandrodz showed code for nginx): <Files xmlrpc.php> Order deny,allow … Read more
There are plugins for that: e.g. http://wordpress.org/plugins/disable-xml-rpc/ You can also write a filter yourself add_filter(‘xmlrpc_enabled’, ‘__return_false’); You can simply add this code your theme functions.php (located in wp-content/themes/your_theme). However, you are advised to create a child theme (http://codex.wordpress.org/Theme_Development) so that your modification does not disappear when you update the theme. Alternatively, you can create your … Read more