2007-07-28

Trackback 與 LWP

use LWP::UserAgent;
use strict;

my $ua = LWP::UserAgent->new;
my $url = 'http://lcamel.wordpress.com/2006/05/30/comment-annotation-discussion/trackback/';
my $data = [
'title' => 'good title...',
'url' => 'http://blog.lcamel.org/2007/07/blog-post_23.html',
'excerpt' => 'good excerpt',
'blog_name' => 'good blog_name'
];
my $response = $ua->post($url, $data);
print $response->content;

No comments: