Cross-domain cookies & subdomains?

I don't think you can have a (sub)domain point to a different domain, but you can have both the (sub)domain and the other domain point to the same IP-address.
http://www.daniweb.com/forums/thread180252.html
If your cookie is set at domain.com, you can read it at forum.domain.com, but not at siteforum.com, even though they are at the same location and have the same IP address.

What you can do to read a cookie on a different domain, is write a script that sets a cookie, and store the script on the other domain.

Then, in a page on the first domain, you call the script:

PHP Code:

// in page on domain.com setcookie$value$name, ... ); $dummy =  file"http://siteforum.com/setcookie?cookie=$name&valu

Post a Comment

0 Comments