Perl programmer for hire: download my resume (PDF).
John Bokma MexIT
freelance Perl programmer

Comments: Using Perl to post to a WordPress blog

5 comments

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.

Comments

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 ?

Posted by krzysiez at 08:27 GMT on 14 November 2006

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.

Posted by John Bokma at 00:46 GMT on 15 November 2006

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

Posted by dandye at 01:03 GMT on 22 May 2008

@dandye - you might want to try:

blog_server = "my.server.com"
blog_rpc_script = "/dandye/xmlrpc.php"

Let me know if this works.

Posted by John Bokma at 03:18 GMT on 22 May 2008

Thanks for this! It works very well but how about posting the content of a html file? Thank you again

Posted by ecoenrg at 23:55 GMT on 2 June 2011

Post a comment

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].