use HTTP::Request;
use LWP::UserAgent;
my $ua = new LWP::UserAgent;
$|=1;
print "content-type:text/html\n\n";
$ua->agent("AgentName/1.0 " . $ua->agent);
$ua->timeout(80);
# Create a request
my $req = new HTTP::Request POST => 'http://search.sina.com.cn/cgi-bin/search/search.cgi';
$req->content_type('application/x-www-form-urlencoded');
my $buffer="ss=sina&_searchkey=活动+奖项&_andor=and&s1=搜索";
$req->content($buffer);
# Pass request to the user agent and get a response back
my $res = $ua->request($req);
# Check the outcome of the response
if ($res->is_success) {
print length($res->content);
print <
END
;
print $res->content ;
} else {
print "bad luck";
}