php get cookie set by another server
<p>I know I am asking how to get the cross-domain cookies and that is traditionally not possible but we have a situation where we had two servers <code>site1.domain.com</code> and <code>site2.domain.com</code> and we had a cookie based SSO which was working fine until the company decided to move <code>site2.domain.com</code> to a completely different domain. Now the problem is, when someone logs in to <code>site1.domain.com</code>, we set a cookie for the <code>.domain.com.</code></p>

<p>I want to check if there's a cookie from <code>domain2.com</code>, which is the new domain of the second server.</p>

<p>I tried curl to call a page called getCookie.php, which just gets the cookie and sends the response back but curl initiates a completely new session and doesn't pretend to be a user who is browsing the site2.domain2.com</p>

<p>Is there any way, I can read that cookie value from site2? Any help is appreciated.</p>
