1

I'm using laravel and this :

https://github.com/comodojo/metaweblog/

Here is the code in controller:

public function testNewPost() {
    $mwlog = new MetaWeblog("http://example.org/services/metablog.ashx","user","pass");
    $struct = array(
        'title'             =>  "Test Post",
        'description'       =>  "Test Post description",
        'post_type'         =>  "post",
        'categories'        =>  array('uncategorized'),
        'mt_keywords'       =>  array('test','post'),
        'mt_allow_comments' =>  "open",
        'mt_allow_pings'    =>  "open"
    );

    $post = $mwlog->newPost($struct);

}

But it returns :

Input string was not in a correct format.

What's wrong?!

M. Safari
  • 303
  • 9
  • 22
  • I'm betting that the categories array expects ID's and not strings. This error typically means a string was searched for an integer, and the string did not contain an integer – Ohgodwhy Mar 13 '17 at 22:57
  • Plugin works with Wordpress. Search problems in your server XmlRpc protocol implementation – Pavlo Zhukov Mar 21 '17 at 19:10

0 Answers0