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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.