On Thu, 5 Jul 2001 14:59:19 +0200, Tobias Talltorp
>Hello all.
>I want multiple domains to be able to read from one cookie, or set
>cookie each for the different domains.
>Here is the case:
>When the user logs in to my server, I want to set a cookie that has
>value $name="tobias". He specifies which domains that can read this
>something like $domains="domain1.com;domain2.com;domain6.com".
>Then these sites can read the $name and print it.
>The other way might be to set one cookie with the value
>$name="tobias" for
>domain1.com, one for domain2.com and one for domain6.com.
>But the cookie _has_ to come from domain1.com, otherwise it will
>only work
>for mydomain.com, right?
>In other words, I canīt set, edit or read a cookie for an other
>How would I go about doing this?

right, you can't do it. the browser won't accept a cookie for a
domain other than the one it's coming from, and it won't send a
cookie for a domain other than the one that's being requested.

a couple of ideas for a workaround would be:
1) you can set a cookie on domain1, redirect to a page on domain2
which sets another cookie, redirects to domain6 and sets another
cookie and redirects back to domain1 (messy)

2) you can restructure your domains into subdomains like so:
these will all get and send cookies for domain 'domain.com'

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to