How to use XML-RPC metaWeblog.newPost properly with PHP?

后端 未结 1 1507
执念已碎
执念已碎 2021-01-03 17:30

I want to make new posts on my blog remotely with XMLRPC API and I\'m trying to use metaWeblog.newPost function, because it provides more features. I successful

1条回答
  •  半阙折子戏
    2021-01-03 17:54

    include "remotepost.class.php";
    $content['title'] = $_POST['title'];
    $content['categories'] = $_POST['category'];
    $content['description'] = $_POST['description'];
    

    changes to

    $content['categories'] = array($_POST['category']); 
    

    It must be an array, it took my all night, i guess i have read more than 200 pages for this lol, gooooogled

    0 讨论(0)
提交回复
热议问题