previousBlog posts / entries (Previous) (Next) Services_Deliciousnext

View this page in Last updated: Sun, 18 Oct 2009
English | Brazilian Portuguese | Chinese | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

Example

Posting an entry

<?php
require_once 'Services/Blogging.php';

$bl Services_Blogging::factory(
    
'metaWeblog',
    
'username''password',
    
'http://blog.example.com''/xmlrpc.php'
);


$post $bl->createNewPost();
//$post->setId('14');
$post->title 'Modified post title';
$post->content "This is a modified test post by"
               
" Services_Blogging\r\n\r\nSecond line\r\nThird one";
$post->categories = array('cat1''cat3');

$bl->savePost($post);
$nLastPostId $post->id;
echo 
'post id: ' $nLastPostId "\r\n";

//$bl->deletePost(17);

var_dump($bl->getPost($nLastPostId));
var_dump($bl->getRecentPostTitles(2));
var_dump($bl->getRecentPosts());

?>
previousBlog posts / entries (Previous) (Next) Services_Deliciousnext

Download Documentation Last updated: Sun, 18 Oct 2009
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.