in reply to Re: app not storing cookies (using LWP::UserAgent)
in thread app not storing cookies (using LWP::UserAgent)
The result is that it 'worked', however the 'content' reply is not logged in still. Something simple I'm sure, but I'm racking my brain searching for this.my $ua = LWP::UserAgent->new; my $cookie_jar = HTTP::Cookies->new(); $cookie_jar->load("test.txt"); $ua->cookie_jar(); my $banUrl = 'http://website.com/mod/ban.php'; my $request = $ua->request(POST "$banUrl", { banUser => 'name here', submitBan => 'Ban User' }); if($request->is_success){ print "worked\n"; }else{ print "failed\n"; } print "Content: ".$request->content."\n";
|
|---|