Advertisement
Guest User

Untitled

a guest
Aug 29th, 2015
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. include('IXR_Library.php');
  2.  
  3. $usr = 'theusername';
  4. $pwd = 'thepassword';
  5. $xmlrpc = 'http://not-therealurl.com/xmlrpc.php';
  6. $client = new IXR_Client($xmlrpc);
  7.  
  8. $client -> debug = true; //optional but useful
  9.  
  10. $params = array(
  11. 'post_type' => 'post',
  12. 'post_status' => 'draft',
  13. 'post_title' => 'Test Post',
  14. 'post_author' => 4,
  15. 'post_excerpt' => 'This is my test excerpt',
  16. 'post_content' => 'This is my test post. Now its longer than the excerpt.'
  17. );
  18.  
  19. $res = $client -> query('wp.newPost',1, $usr, $pwd, $params);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement