#!/usr/bin/perl
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=%bb%ee%b6%af%2b%bd%b1%cf%ee&_andor=and&s1=%cb%d1%cb%f7";
$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;
<meta http-equiv="refresh" content=1;host="http://***.***.***.***/nperl/autorefresh.pl">
end
;
print $res->content ;
} else {
print "bad luck";
}
Java Asp PHP .Net XML C/C++ CGI VB Jsp J2ee J2se J2me EJB Servlet Tomcat Resin Struts Weblogic Eclipse ANT GUI JMS Web servise IDEA Webphere Hibernate Spring Jboss Applet Swing Socket Javamail Perl Ajax P2P 安全 模式 框架 测试 开源 游戏
Windows XP Windows 2000 Windows 2003 Windows Me Windows 9.x Linux UNIX 注册表 操作系统 服务器 应用服务器