Today I was looking for a simple Perl example of posting to a WordPress blog. I learned that WordPress uses XML-RPC, a remote procedure call protocol using XML to encode its calls, but the documentation was not that good.
Read the rest of Using Perl to post to a WordPress blog.
krzysiez - I searched a bit with Google, and from what I've read if your blog is at, say, http:// krzysiez . wordpress . com /, using http:// krzysiez . wordpress . com / xmlrpc.php should work. Notice that I added additional spaces in both links because I am not sure if that's your actual blog.
Hope this helps, let me know.
Hey John,
Thanks for posting this script. I was getting really frustrated because WordPress Mu's XMLRPC "always posts to first blog" (see ticket #551 in the WP Trac). Compounding the problem,the XMLRPC Ruby library only doesn't allow additional folders in the path.
For example:
blog_server = "my.server.com"
blog_rpc_script = "/xmlrpc.php"
server = XMLRPC::Client.new(blog_server, blog_rpc_script)
and
blog_server = "my.server.com/dandye"
doesn't work.
Your solution fixes this for WordPress Mu since I can now use "my.server.com/dandye/xmlrpc.php"
Perl +1 Ruby -1
@dandye - you might want to try:
blog_server = "my.server.com"
blog_rpc_script = "/dandye/xmlrpc.php"
Let me know if this works.
Thanks for this! It works very well but how about posting the content of a html file? Thank you again
Note that your comment doesn't show up immediately. I review each comment before I add it to this site.
Check the Follow this page option if you want to receive an email each time a comment is posted to this page, including yours. A link to turn this option off will be included with each email.
Internet adresses will be converted automatically. You can use the following notation to specify anchor text for a link: [url=http://example.com/]example text[/url].
Hi John,
I use your perl script to post on wordpress, it works perfect on standard wp. But couple a days ago I create blog in service: wordpress.com and can't post via xmlrpc :/ what i must do to can post xmlrpc to this service ?