Search results for 'xmlrpc.inc'. 1 post(s) found.

  1. 2007/12/15 Posting to a Wordpress Blog Via XMLRPC Using Blogger API (1)
2007/12/15 10:54

Posting to a Wordpress Blog Via XMLRPC Using Blogger API


RPCXML is now the standard widely using on earth.

Microsoft Windows Live is also using RPCXML in order to post blog content.
Actually there are lots of specification for posting blog stuffs: Metaweblog API, Blogger API, and so on.

Following is the simple example can post blog stuffs directly via your PHP server.

<?php
//requires xmlrpc.inc from http://phpXMLRPC.sourceforge.net/
require_once('xmlrpc.inc');
 
$XMLRPCurl = "http://your blog url/XMLRPC.php";
 
$client = new XMLRPC_client($XMLRPCurl);
 
$params[] = new XMLRPCval("n/a");
$params[] = new XMLRPCval("n/a");
$params[] = new XMLRPCval("login");            //your Wordpress login
$params[] = new XMLRPCval("password");        //your Wordpress password
$params[] = new XMLRPCval(
"<title>The Post Title</title>".            //the title of your post
"<category>"."[CATEGORY]"."</category>".    //the category
$posttext);                                 //the body
$params[] = new XMLRPCval("true");          //publish now = true
 
$msg    = new XMLRPCmsg("blogger.newPost",$params);
 
$response = $client->send($msg);
?>

Another posts included in "PHP"

How to post blog content by metaweblog API ? (3)2008/01/02
How to upload attachments such as image by metaWeblog API ? (0)2008/01/07
XMLRPC example (0)2008/01/07
foreach loop (0)2007/10/16
Can PHP switch in strings ? (0)2007/10/16
PHP Switch Example (0)2007/10/16
How to send email in PHP ? (0)2007/10/16
How to pass variables via url (0)2007/10/16
Trackback 3 1

Trackback : Cannot send a trackbact to this post.

  1. Subject different money making ideas

    Tracked from moneyideas 2010/01/29 01:17 delete

    moneyideas

  2. Subject different money making ideas

    Tracked from moneyideas 2010/01/29 09:45 delete

    moneyideas

  3. Subject different money making ideas

    Tracked from moneyideas 2010/01/31 16:42 delete

    moneyideas