G
Guest
I make program that download ZIP file from web.
Why downloaded file isn't ZIP file?
Why file has different size?
If I make download from IE I downloaded file is ZIP file?
IE-downloaded file size is 495.306 bites long.
Perl-downloaded file size is 497.098 bites long.
Please help me.
Thanks.
Perl program
--------------------------
# c:\perl\bin\perl.exe
#
#
use warnings;
use strict;
use WWW::Mechanize;
use CGI;
my $cgi = CGI->new();
my $form = $cgi->Vars;
my $agent = WWW::Mechanize->new();
$agent->get('http://www.ve-mil.hr/korisnici/Login.aspx');
$agent->form_number('1');
$agent->field('EmailTextBox','user22');
$agent->field('LozinkaTextBox','********');
$agent->submit();
$agent->get('http://www.ve-mil.hr/download.aspx?Item=Cjenik_Zip');
open (FF, ">Cjenik.zip");
print FF $agent->content();
Why downloaded file isn't ZIP file?
Why file has different size?
If I make download from IE I downloaded file is ZIP file?
IE-downloaded file size is 495.306 bites long.
Perl-downloaded file size is 497.098 bites long.
Please help me.
Thanks.
Perl program
--------------------------
# c:\perl\bin\perl.exe
#
#
use warnings;
use strict;
use WWW::Mechanize;
use CGI;
my $cgi = CGI->new();
my $form = $cgi->Vars;
my $agent = WWW::Mechanize->new();
$agent->get('http://www.ve-mil.hr/korisnici/Login.aspx');
$agent->form_number('1');
$agent->field('EmailTextBox','user22');
$agent->field('LozinkaTextBox','********');
$agent->submit();
$agent->get('http://www.ve-mil.hr/download.aspx?Item=Cjenik_Zip');
open (FF, ">Cjenik.zip");
print FF $agent->content();