• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can a cookie be valid for more than one domain?

#5
[eluser]tonanbarbarian[/eluser]
You could probably do the following but it is a MAJOR security risk
Code:
$cookie = array(
                   'name'   => 'The Cookie Name',
                   'value'  => 'The Value',
                   'expire' => '86500',
                   'domain' => '.tld',
                   'path'   => '/',
                   'prefix' => 'myprefix_',
               );

set_cookie($cookie);

This would be the same as saying that the cookie is valid for all .com domains. As you can imagine not a good idea.
You probably need to create 2 cookies in this case 1 for each domain.


Messages In This Thread
Can a cookie be valid for more than one domain? - by El Forum - 12-06-2007, 03:16 PM
Can a cookie be valid for more than one domain? - by El Forum - 12-06-2007, 04:15 PM
Can a cookie be valid for more than one domain? - by El Forum - 12-06-2007, 04:25 PM
Can a cookie be valid for more than one domain? - by El Forum - 12-06-2007, 07:02 PM
Can a cookie be valid for more than one domain? - by El Forum - 12-06-2007, 08:50 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.