[php][xmlrpc]忍者ブログに外部から記事を投稿してみる。
ソーシャルブックマークに追加:忍者ブログはxmlrpcが使えるということなので、
やってみました。
---------------------------------------------------------------------------------------
///////////////////////////////////////////////
//個別設定//
///////////////////////////////////////////////
$user = "ブログのURLからhttp://を消したやつ";//例:stl.blog.shinobi.jp
$host = "ブログのURL";//例:http://stl.blog.shinobi.jp/
$xmlrpc_passwd = "ユーザ情報の変更の記事投稿用パスワード";
///////////////////////////////////////////////
$xmlrpc_path = "/XMLRPC/";
$port = 80;
///////////////////////////////////////////////
//PearのXMLRPCパッケージを読み込む
require_once("XML/RPC.php");
//XMLRPC文字コードを設定
$GLOBALS['XML_RPC_defencoding'] = "UTF-8";
//XMLRPCクライアントの作成
$Client = new XML_RPC_client( $xmlrpc_path, $host, $port );
//appkey:忍者ブログは空で。
$appkey = new XML_RPC_Value( '', 'string' );
//appkey:忍者ブログは1で。
$blogid = new XML_RPC_Value( 1, 'string');
//ユーザ名作成
$username = new XML_RPC_Value( $user, 'string' );
//パスワード作成
$passwd = new XML_RPC_Value( $xmlrpc_passwd, 'string' );
//コンテンツ作成
$content = new XML_RPC_Value(array(
'title'=> new XML_RPC_Value($t, 'string'),
'description'=> new XML_RPC_Value($d, 'string'),
'dateCreated'=> new XML_RPC_Value(date("Ymd\TH:i:s",time()), 'dateTime.iso8601')
), 'struct');
//パブリッシュのフラグ作成
$publish = new XML_RPC_Value( 1, 'boolean');
//XML-RPCメソッドのセット
$Message = new XML_RPC_Message(
'metaWeblog.newPost',
array($blogid, $username, $passwd, $content, $publish) );
//メッセージ送信
$res = $Client->send($Message);
//お帰り。
return $res;
---------------------------------------------------------------------------------------
と、こんな感じ。
bad credit history loan buy loans. tennessee payday loan. student loan federal mortgage loan rates california.
excel loan amortization template fha house loan. best equity home loan rate. loan terms used automobile loans.
home loan rate comparison bad credit second mortgage loans. mortgage loan calculator amortization. what is a jumbo loan car loan rate.
doctor loans home purchase loan. fast secured loans. automobile title loans loan now.
used car toronto car insurance rate juneau car insurance. free free car insurance online quote. nj car insurance car company insurance look for compare car insurance uk.
car g group guide insurance polo, insurance travelers company auto car. alaska auto insurance company. auto insurance consumer reviews auto insurance rate stability act 1996.