Welcome Guest, Not a member yet? Register   Sign In
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



Theme © iAndrew 2016 - Forum software by © MyBB