1
We have two projects hosted in different domains. I need to pass some information from one domain to the other, to generate a ticket.
I was asked to send session variables to this other domain for billet generation.
After some searches, I saw that it is not possible to pass session data from one domain to another, there is some solution to circumvent this?
The rules for me to recover the desired information in another domain are as follows::
- Set the session variables;
- Then I redirect to the page of the other domain, where it already takes these variables;
- I carry the information I need.
These "projects" are in PHP?
– Lucas de Carvalho
are yes, all two in php, but in different frameworks only.
– Leandro
So just use include or require/require_once, already tried?
– Lucas de Carvalho
how so? use require? but the projects are of different domains
– Leandro
Possible duplicate of Put site path in a PHP include
– Lucas de Carvalho
not at all. It’s crazy?
– Leandro
Have you tried passing on the relevant information via POST or GET? What you want to do is very similar to a web service query
– Jefferson Quesado
@Do these two projects run on the same server? If yes and you have control over this server, you may be able to share sessions. Read that. However, I find it more practical and guaranteed to do this communication through a simple HTTP request. Just one application does the POST request, as Jefferson commented, for the other application by sending the required data and treating the response.
– Woss
yes, they are on the same server.
– Leandro