Yes, it has limitations, but can be relieved easily. Set HTTP header "Access-Control-Allow-Origin" to "*" does it.
The only secure way to pass logins between Applications is either oAuth2 or SAML2 - everything else will compromise either site security in some way.
change the second file <?php ini_set("session.use_cookies",0); ini_set("session.use_trans_sid",1); session_id($_GET['session_id']); $some_var = session_id(); // remove session_destroy code because no session is set before. session_start(); $_SESSION["var_name"] = $some_var; header("location: anotherfile.php"); to this it will be fine <?php session_id($_GET['session_id']); $some_var = session_id(); // remove session_destroy code because no session is set before. session_start(); $_SESSION["var_name"]...