in reply to PHP username information
I think it's possible. Here's a snippet to get you looking in the right place.
use strict; use warnings; use CGI (); use CGI::Cookie (); use YAML (); print CGI::header("text/plain"); print YAML::Dump( { CGI::Cookie->fetch() } );
What you'll need to do is duplicate the session authentication from the PHP in your Perl to verify the cookie is from a real, authenticated user. This will likely involve a DB call based on the information you get from the cookie(s). Note, this will only work if the PHP and the Perl are run from the same domain and cookie rules. Otherwise the browser won't let Perl have any cookies set by the PHP.
|
|---|