How to set and access Cookies across multiple sites using PHP cURL?
I am developing a system where I got lots of sites and need to enable Single SignOn开发者_StackOverflow between them so I decided to go for this scenario..
myssosite.com -> Sets cookie for mainsite.com with some variables. (This sites is not public) mysite1.com / mysite1.com / ..... -> If user is not logged in check for any existing cookie on myssosite.com if yes than login user else go to login page. When user logs in on any of site just create cookie on remote site myssosite.com.
Please help me as soon as possible.
You can't create cookies for other websites!
If a user was logged in to site1, but not to site2, then you need to redirect along with some authentication to site2. Same applies vice versa.
The user will have to navigate from one site to other so that you could do it. Simply by going to www.site2.com wouldn't have them magically logged in without any data.
精彩评论