I am working on an application that mixes php and Java. I need to inject some values into the php session through Java, but to do this I need to be able to parse the values of the php session into a set. Is there a library that will let me undo in Java what session_encode does in php?
You can configure your PHP environment to store the session data in WWDX format http://www.php.net/manual/en/session.configuration.php#ini.session.serialize-handler
session.serialize_handler defines the name of the handler which is used to
serialize/deserialize data. Currently, a PHP internal format (name php or php_binary)
and WDDX are supported (name wddx). WDDX is only available,
if PHP is compiled with WDDX support. Defaults to php.`
About WDDX:
The Web Distributed Data Exchange, or WDDX, is a free, open XML-based technology that allows Web applications created with any platform to easily exchange data with one another over the Web.
and the Java WDDX Parser available via googling :) http://www.google.com.ua/search?q=java+wddx+parser
Ofcourse this solution is more complex than just write simple parser class – the PHP session format is really simple.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With