如何禁用cookie,我们如何将会话数据传输到另一个子域。

如何禁用cookie,我们如何将会话数据传输到另一个子域。

问题描述:

We would like to know the source code for transfer the session data to the sub-domain.

www.xyz.com // session data transfer to dev.xyz.com
dev.xyz.com // 

We are not able to get the data, if there is a Cookies Disabled by User end. please suggest me.

Thanks

PPS

我们想知道将会话数据传输到子域的源代码。 p>

  www.xyz.com //会话数据传输到dev.xyz.com 
dev.xyz.com // 
  code>  pre> 
  
 

如果用户端禁用了Cookie,我们将无法获取数据。 请建议我。 p>

谢谢 p>

PPS p> div>

One way I can think of is like this:

make a hash with visitor IP and browser and send it along with encoded (base64?) $_SESSION data to second server like:

file_get_contents('http://dev.xyz.com/gateway.php?session=$IPBrowser&session=$session')

on the second server save that to a temporary table?/file and redirect user to second domain. then you check his info based on IP and Browser and apply SESSION data.

this a VERY vulnerable solution, but it's a solution. I posted this thinking you are using for dev purposes.

And no, I will not make the source code.