Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- include('IXR_Library.php');
- $usr = 'theusername';
- $pwd = 'thepassword';
- $xmlrpc = 'http://not-therealurl.com/xmlrpc.php';
- $client = new IXR_Client($xmlrpc);
- $client -> debug = true; //optional but useful
- $params = array(
- 'post_type' => 'post',
- 'post_status' => 'draft',
- 'post_title' => 'Test Post',
- 'post_author' => 4,
- 'post_excerpt' => 'This is my test excerpt',
- 'post_content' => 'This is my test post. Now its longer than the excerpt.'
- );
- $res = $client -> query('wp.newPost',1, $usr, $pwd, $params);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement