in reply to SOLVED! PHP Sessions and Perl
This isn't a use case for CGI::Lite, you aren't running a CGI script here. Consider the following:
#!/usr/bin/perl use WWW::Mechanize; use strict; use warnings; my $browser = WWW::Mechanize->new(); my $response = $browser->get('https://archive.org'); my $cookie_jar = $browser->cookie_jar(HTTP::Cookies->new()); $cookie_jar->extract_cookies( $response ); my $cookie_content = $cookie_jar->as_string; print $cookie_content;
Prints:
Set-Cookie3: PHPSESSID=ls6vbb4cqpeord3o1g96hmacg6; path="/"; domain=ar +chive.org; path_spec; discard; version=0 Set-Cookie3: abtest-identifier=ba42ec4d4af62f23e1645b2597f22eec; path= +"/"; domain=archive.org; path_spec; expires="2022-03-16 16:35:57Z"; v +ersion=0 Set-Cookie3: donation-identifier=d3bd1e3bebfa0105babd7b9ca4a9b5c4; pat +h="/"; domain=archive.org; path_spec; expires="2022-03-16 16:35:57Z"; + version=0
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: PHP Sessions and Perl
by bajangerry (Sexton) on Mar 16, 2021 at 17:41 UTC | |
by marto (Cardinal) on Mar 16, 2021 at 17:50 UTC | |
by bajangerry (Sexton) on Mar 16, 2021 at 18:27 UTC | |
by tangent (Parson) on Mar 16, 2021 at 19:50 UTC |