qq591577286 发表于 2015-12-28 15:40:15

perl中抓http页面的方法


use HTTP::Request;
use LWP::UserAgent;
my $url = "http://".$PREF{webServer}."/index.php?act=upload&task=checkMd5&md5=".$md5."&id=".$PREF{uploadid};
my $ua = LWP::UserAgent->new;
my $req = new HTTP::Request(GET => $url);
my $resp = $ua->request($req);
my $result = $resp->content();
if ($result eq 'wrong' )
{
unlock_log_file();
fatal_error( "不能重复上传同一个文件" );
}
页: [1]
查看完整版本: perl中抓http页面的方法