Send sessions to default browser

Having some issue with project and before I dig in deeper:

Can sessions from an exeout .exe file be passed to default browser?

Something like this on page in exe:

// Set session variable
$_SESSION["math_key"] = $math_key;

and then read in browser like:

$math_key = $_SESSION["math_key"];

Before spending hours debugging, want to make sure even feasible first.

I know there are ways like below (url), am I on right track or is this not possible?

$sessionValue = $_SESSION['math_key'];
$url = "" . urlencode($sessionValue);

Or are there any other ideas for something similar?

Nope, not going to work. WebRTC might work but does not seem like worth the effort.

No, that’s not possible, unfortunately.

Thanks for confirming. Was pretty sure not possible but had hopes someone else might had need to pass a session. One way I am experimenting with is via POST.

Sure, you can pass the session variables to a server using the internal viewer with POST and an AJAX request for instance.

Yes, but not always reliable :slight_smile: I deal with a “locked down” world and post with especially ajax raises flags like a new navy.

Just a thought - Put variables into json, encrypt to something url safe, then
exec (“start $url?data=$encrypted”);
maybe ?

Not a bad idea! Have to think about this and flow of code. You have any ideas on the actual code?

@oldteacher It would take me a while to work out fully, and pretty busy atm but these would most likely be the functions you would use.

Start with the array.

json_encode -
openssl_encrypt -
urlencode -

Then at other end…

urldecode -
openssl_decrypt -
json_decode -

Then you should be back at the original array.