Jump to content

Cross Domain Session


bogeyman

Recommended Posts

I would say yes and no.  Here are my ideas on ways around it..

 

1.  Use cookies.

 

2.  Use a back ground process of php curl to create an instance on another page.  For example if you were running in domain1.somewhere.com and then you wanted to create a session in domain2.somewhere.com you could use php's curl function to open up a page in the background and proceed from there.  For example you could have a page similar to domain2.somewhere.com/newsession.php and like open that up in the background of domain1.somewhere.com.  The newsession.php page would be something that the actual user would never even know about or even see.  It could be used to create sessions with some pre defined data.

 

let me know if you need anything else.

Link to comment
https://forums.phpfreaks.com/topic/132657-cross-domain-session/#findComment-689986
Share on other sites

Well, I got another solution. I just modify php.ini and change the line :

 

session.cookie_domain =

 

To (the domain name is just an example) :

 

session.cookie_domain = .somewhere.com

 

That means every subdomain can use the same session as long as they are under the same domain name (in this case somewhere.com) and located at the same web server.

 

But, I think your idea is very good and I will try it. I think it can be implemented even if the domains are located at different server and have completely different domain name.

 

Thanx.

Link to comment
https://forums.phpfreaks.com/topic/132657-cross-domain-session/#findComment-691769
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.