Support » Plugins » Posting HTML content via XML-RPC

  • How can I post an HTML formatted post via the XML-RPC interface? If I post the HTML code it gets converted to entities. If I preconvert content to entities, it doesn’t get converted back (obviously) 🙂

    I am using PHP with the xml-rpc library. Example Code:


    $content = "Bold Statement;
    $xmlrpcurl = "http://127.0.0.1:2006/devwp/xmlrpc.php";

    $client = new xmlrpc_client($xmlrpcurl);

    $params[] = new xmlrpcval("n/a");
    $params[] = new xmlrpcval("n/a");
    $params[] = new xmlrpcval("admin");
    $params[] = new xmlrpcval("chrislottt");
    $params[] = new xmlrpcval(
    "<title>LinkLog</title>".
    "<category>2</category>".
    $content);
    $params[] = new xmlrpcval("true");

    $msg = new xmlrpcmsg("blogger.newPost",$params);

    Am I going to have to do a direct insert into the WP tables or use the internal WP functions??

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Posting HTML content via XML-RPC’ is closed to new replies.