【问题标题】:send post include text and image by xmlrpc to wordpress通过 xmlrpc 将包含文本和图像的帖子发送到 wordpress
【发布时间】:2011-10-08 17:33:37
【问题描述】:

我正在寻找一种通过 xmlrpc 将内容(文本和图像)远程发送到 wordpress 的方法,但我还没有找到,我打算将每分钟超过 100 个帖子的远程内容(文本和图像)发送到 wordpress,什么是最好的方法是什么?非常感谢

【问题讨论】:

    标签: image wordpress post xml-rpc send


    【解决方案1】:

    使用 XMLRPC。像这样的:

    $params = array(0,$username,$password,$content,true);
    $request = xmlrpc_encode_request('metaWeblog.newPost',$params);
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_POSTFIELDS, $request);
    curl_setopt($ch, CURLOPT_URL, $rpcurl);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_TIMEOUT, 1);
    $results = curl_exec($ch);
    curl_close($ch);
    

    【讨论】:

      猜你喜欢
      • 2013-07-17
      • 2010-12-16
      • 2023-03-30
      • 2023-01-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多