|< 1 2 3 >| | 24 Einträge, 3 Seiten |
QuoteReload im Browser?Wie gesagt 30xReload des Forms und einmal dehlen die POST Daten.
QuoteReload im Browser?Wie gesagt 30xReload des Forms und einmal dehlen die POST Daten.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/perl
$| = 1;
use strict;
use warnings;
use LWP::UserAgent;
sub doSM {
my $i = shift;
my $ua = LWP::UserAgent->new;
$ua->agent("MyApp/P$i ");
# Create a request
my $req = HTTP::Request->new(POST => 'http://testserver/cgi-bin/cgi.pl');
$req->content_type('application/x-www-form-urlencoded');
#$req->content('var1=www');
$req->content('var1=www' . scalar time . '&var2=zzz' . scalar time );
# 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 $res->content;
} else {
print "Bad luck this time\n";
}
}
for (my $i=1; $i<=100; $i++) { doSM($i) }
1;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/perl
$| = 1;
use strict;
use warnings;
use CGI ();
# --------------------
my $query = new CGI;
print $query->header( );
my $var1 = $query->param('var1');
my $var2 = $query->param('var2');
warn ("CGI: $CGI::VERSION Keine Daten für \$var1") if ( not defined($var1) or length($var1) == 0 );
warn ("CGI: $CGI::VERSION Keine Daten für \$var2") if ( not defined($var2) or length($var2) == 0 );
1;
|< 1 2 3 >| | 24 Einträge, 3 Seiten |