Send sessions to default browser

oldteacher

Active member
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:
Code:
session_start();
// Set session variable
$_SESSION["math_key"] = $math_key;
and then read in browser like:
Code:
session_start();
$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?
Code:
$sessionValue = $_SESSION['math_key'];
$url = "https://example.com/next_page.php?session_value=" . urlencode($sessionValue);
 
Nope, not going to work. WebRTC might work but does not seem like worth the effort.
 
Last edited:
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 🙂 I deal with a “locked down” world and post with especially ajax raises flags like a new navy.
 
Last edited:
Just a thought - Put variables into json, encrypt to something url safe, then
exec (“start $url?data=$encrypted”);
maybe ?
 
Last edited:
@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 - https://www.php.net/manual/en/function.json-encode
openssl_encrypt - https://www.php.net/manual/en/function.openssl-encrypt.php
urlencode - https://www.php.net/manual/en/function.urlencode.php

Then at other end…

urldecode - https://www.php.net/manual/en/function.urldecode.php
openssl_decrypt - https://www.php.net/manual/en/function.openssl-decrypt.php
json_decode - https://www.php.net/manual/en/function.json-decode.php

Then you should be back at the original array.
 
Last edited:
Back
Top