Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xmlrpc request object error 32300 transport error

    $postcontent = array(
        'post_type' => 'post',
        'post_status' => $post_status, 
        'post_title' => $post_title,
        'post_name' => $post_title,
        'post_content' => $post_content,

        'post_thumbnail' => $image_returnInfo['id']
    //  'terms_names'=> array( 'category' => $category_battery),

    );

$res = $client -> query('wp.newPost',1, $usr, $pwd, $postcontent);
$postID =  $client->getResponse();

print_r($client); 

While i tried to insert the post from xmlrpc wordpress api i got error 32300. How can i solve this?

i got following result.

IXR_Client Object
(
    [server] => battery.kis-com.ch
    [port] => 80
    [path] => /battery-station/xmlrpc.php
    [useragent] => The Incutio XML-RPC PHP Library
    [response] => 
    [message] => 
    [debug] => 
    [timeout] => 15
    [headers] => Array
        (
            [Host] => battery.kis-com.ch
            [Content-Type] => text/xml
            [User-Agent] => The Incutio XML-RPC PHP Library
            [Content-Length] => 781
        )

    [error] => IXR_Error Object
        (
            [code] => -32300
            [message] => transport error - HTTP status code was not 200
        )

)
like image 925
Rocky Prajapati Avatar asked Aug 03 '26 20:08

Rocky Prajapati


1 Answers

Please follow this link (https://codex.wordpress.org/XML-RPC_WordPress_API). Changing the port might help because all the ports take default value 80. Changing it into port number into 81 or other numbers might help.

like image 162
Dipesh Thapa Avatar answered Aug 05 '26 10:08

Dipesh Thapa



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!