elWpAPI (Wordpress API) has gone Incutio XMLRPC Library (IXR) Friendly

Just had a client telling me his hosting service has updated PHP and somehow lost elWpAPI functionality on the way. I don't know what they have done but maybe disabled the XMLRPC extension.

This is a first, but , as I seek to please (sigh) :) I quickly made the code compatible with IXR. Get the library here directly. So, right now, you should be able to use this without the PHP XMLRPC Extension. I tested it and it works but you make sure to save the oldie but goldie version before you try on the new one. I might have missed stuff on the way ... it happens when I speed code.

Enjoy.

There are a few changes in the code. If the response is a fault (error) the returned result will always be null. Use $wp->wasError() or $wp->wasSuccess() to determine success status. This way it will be a lot easier to determine success state of an operation. Use if(!($response = $wp->doStuff())) return false;

You can also totally avoid PHP XMLRPC if IXR exists by changing this to TRUE: define('FORCE_IXR_XMLRPC', false);

If you got problems ... the comment form is below. And go get a fresh copy!

Category: PHP, Wordpress Hacks, XMLRPC API
Tagged:

6 Responses

  1. +wgibiz1:2 — #69 says:

    I would like to use elWpAPI to manage wp blogs from desktop.

    So, my question :
    Is elWpAPI compatible to the existing wp xmlrpc format so that I can call from window client like VB, C# and delphi apps?

    • You should not use this to post from a C# client. Just write a C# class to remote post to your blogs.
      You could get this class to reverse engineer it and write your own but … using an intermediary is overkill.

      I have this very code in C++ but can’t share as it’s SDK only and relies on other classes I have. Non-MFC.

      • +wgibiz2:2 — #69 says:

        I already have C# app to post to blogs using the wp default xmlrpc api, I wonder if elWpAPI can be used too, so to manage the whole blog.

        If I buy, do you have “working example” page to test each api method.

  2. Download again, place IXR in same folder with elWpAPI and require_once the IXR before you require_once elWpAPI in your script.

  3. Read this pls: http://blog.5ubliminal.com/posts/remote-control-wordpress-blog-xmlrpc-api/#comment-842
    From your code pasted here I can see you have not update the xmlrpc.php and wpapi.php on your server.

    Please download the new copies. There is no xmlrpc_is_fault in elWpAPI anymore.