迷惑かけといて、素晴らしいソースをいただきました
#!/usr/local/bin/perl use strict; use XMLRPC::Lite; eval { my $server_url = 'http://app.cocolog-nifty.com/t/api'; my $new_id; my $account = ***; my $password = ***; my $blog_id = ***; my $entry = { description => "xxx", title => "XM", dateCreated => "2005-09-28T09:09:09", }; my $result; $new_id = eval { my @args = ($blog_id, $account, $password, $entry, 1); $result = XMLRPC::Lite ->proxy($server_url) ->call("metaWeblog.newPost", @args) ->result; }; if ($@) { my $err = "XML-RPC newPost call failed: "; note_error($err . $@, 2); return -1; } print $new_id if($new_id); print "end"; }; if (my $err = $@) { print $err; die; } 1;
メモメモ。。。