views:

88

answers:

2

Can I use a session variable that I have created with php in perl?

+7  A: 

Theoretically you could: you just need to know where (and also how) the PHP session is saved. If it is a normal file-based session save handler - you just need to have access to read PHP session files. Then you can read the content out of it and unserialize it (because PHP saves all session content serialized there). For unserializing you can use PHP serialize and unserialize in Perl implementation.

Laimoncijus
good idea, i haven't thougt of that in my answer
oezi
+5  A: 

Yes, there is PHP::Session on CPAN.

Kinopiko
Seems like the best solution to me. If you just need serialize() and unserialize() use PHP::Serialization http://search.cpan.org/~bobtfish/PHP-Serialization-0.34/lib/PHP/Serialization.pm
Htbaa