$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
)
)
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With