Jump to content


setcookie outside domains

  • Please log in to reply
1 reply to this topic

#1 abarton

  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 30 October 2006 - 05:04 PM

I am trying to set a cookie for a domain that is not the current one but am unable to.

Ie: on www.test.com I run the following

setcookie( 'gender', 'female', time+60*60, "/", ".blah.com" );

The cookie will not set. However if I change the domain on the cookie to test.com it will work. Is this possible? Any ideas?

(I test by inspecting my cookies in Firefox as PHP will not be able to reference cookies outside the current domain.)

#2 trq

  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 30 October 2006 - 05:13 PM

Is this possible?


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users