|
|
|
[
来路:21kn.com 时间:2007-7-8 16:29:27
点击: ] |
|
|
|
|
|
#!/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"; } |
|
|
::::站长友情提示:多花一分钟学点什么都好::::
|
|
|
|
|
|
|
|
|
|
|
|
=
= 免责声明 = = |
|
①
欢迎转载我网所刊信息,请注明“来源:E天下网络”。
② 凡本网注明“来源:XXX(非E天下网络)”的作品,均转载自其它媒体,转载目的在于传递更多信息,并不代表本网赞同其观点和对其真实性负责。如因作品内容、版权和其它问题需要同本网联系的,请在30日内进行。
※联系方式:Airtofly@163.com |
|
|