Re: stupid crosscookie function
| From: | Tim Zickus | Date: | Sat, 16 Dec 2000 00:28:56 +0000 |
| Subject: | Re: stupid crosscookie function | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-30622@lists.php.net to get a copy of this message | ||
That's correct. You can have pages at site1 and site3 that get a
cookied-image from site2, and site 2 can track activity across those sites
(look at the referrer, etc.), but site1 and site3 still can't read the
cookie directly.
Where I've set up a cross-domain cookie server, the site that serves the
image has to be a proxy and hold the cookie on behalf of the other sites.
They can then exchange data through some back-channel (i.e. a common
database or request broker).
For example:
site1:
... <img src="site2.com/setcookie.php?user=12345">
Site 2 sets a proxy cookie with info about user 12345 and stores info in a
database.
If the user subsequently goes to site3, a page at site3 can ask site2 to
return the user associated with the cookie.
I hope that's clear...it's been a looong day. :)
It's an awkward process, but it's possible.
- Tim
> I use images: but cannot grab the cookie from the image that points to the
> other site.
>
> Site 1
> <body>
> <img src="http://site2.com?setcookie.php3">
> </body>
>
> Cookie is set on site2, not site1