Subject: | Usage example in documentation? |
There has been question on PerlMonks:
http://www.perlmonks.org/?node_id=429647
So, it seems fair to submit this bug request for adding example to documentation:
#!/usr/bin/perl -w
use strict;
use PHP::Session;
use CGI::Lite;
my $session_name = 'PHPSESSID'; # change this if needed
print "Content-type: text/plain\n\n";
my $cgi = new CGI::Lite;
my $cookies = $cgi->parse_cookies;
if ($cookies->{$session_name}) {
my $session = PHP::Session->new($cookies->{$session_name});
# now, try to print uid variable from PHP session
print "uid:",Dumper($session->get('uid'));
} else {
print "can't find session cookie $session_name";
}