|
post на perl:
use strict;
use LWP::UserAgent;
my $x1 = ''blabla'';
my $x2 = 666;
my $x3 = "kuku";
my $data = 'par1=' . $x1 . '&par2=' . $x2 . '&par3=' . $x3;
my $ua = LWP::UserAgent->new;
my $req = HTTP::Request->new(POST => 'http://www.site.kharkov.ua/script.asp');
$req->content_type('application/x-www-form-urlencoded');
$req->content($data);
my $res = $ua->request($req);
print $res->as_string;
=============
get на perl
use strict;
use LWP::Simple;
my $u = 'http://www.site.kharkov.ua/script.cgi?par1=666&par2=blabla' ;
my $doc = get "$u";
print $doc;
|