Title: Can&#039;t send a post using RPC XML
Last modified: August 19, 2016

---

# Can't send a post using RPC XML

 *  [hamidoo07](https://wordpress.org/support/users/hamidoo07/)
 * (@hamidoo07)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/post-without-title-when-using-rpc-xml/)
 * Hi,
    i’m using a code to post a new post with rpc xml when i put some texte (
   8 lines) in body the script doesn’t work and no post added but when i put just
   some words in body the post is created so is there any limit to the amount of
   texte that we can send in post body when using rpc xml ?? the code i’m using :
   function wpPostXMLRPC($title,$body,$rpcurl,$username,$password,$category,$keywords
   =’tag’,$encoding=’UTF-8′) { $login = $username; $mdp = $password; $rpc = $rpcurl;
 * $category = array(1);
    $category = implode( ‘,’, $category);
 * $titre = $title;
    $article = $body; $XML = “<category>”.$category.”</category
   ><title>”.$titre.”</title>”.$article; $param = array( ”,” ,$login,$mdp,$XML,1);
   $req = xmlrpc_encode_request(‘blogger.newPost’,$param);
 * $ch = curl_init();
    curl_setopt($ch, CURLOPT_POSTFIELDS, $req); curl_setopt($
   ch, CURLOPT_URL, $rpc); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt(
   $ch, CURLOPT_TIMEOUT, 1); $res=curl_exec($ch); curl_close($ch);
 * return $res;
    }

The topic ‘Can't send a post using RPC XML’ is closed to new replies.

 * In: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
 * 0 replies
 * 1 participant
 * Last reply from: [hamidoo07](https://wordpress.org/support/users/hamidoo07/)
 * Last activity: [15 years, 9 months ago](https://wordpress.org/support/topic/post-without-title-when-using-rpc-xml/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
