Thread POST-Form senden+ PHPSESSION als Authentifizierung (4 answers)
Opened by toby at 2006-10-10 19:57

renee
 2006-10-10 21:10
#28672 #28672
User since
2003-08-04
14371 Artikel
ModeratorIn
[Homepage] [default_avatar]
Du musst einfach ein Cookie_jar erstellen. Dann sollte es klappen...

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/perl

use strict;
use warnings;
use LWP::UserAgent;
use HTTP::Cookies;

# domain um das cookie zu bekommen
my $initial_url = 'http://some.domain.tld/';

my $agent = LWP::UserAgent->new();
$agent->timeout(10);

my $cookie_jar = HTTP::Cookies->new();
$agent->cookie_jar($cookie_jar);
$agent->get($initial_url);
$agent->post($second_url,\%form_data);


Ist natürlich nicht vollständig...
OTRS-Erweiterungen (http://feature-addons.de/)
Frankfurt Perlmongers (http://frankfurt.pm/)
--

Unterlagen OTRS-Workshop 2012: http://otrs.perl-services.de/workshop.html
Perl-Entwicklung: http://perl-services.de/

View full thread POST-Form senden+ PHPSESSION als Authentifizierung