Welcome Guest, Not a member yet? Register   Sign In
Can a cookie be valid for more than one domain?
#2

[eluser]tonanbarbarian[/eluser]
Technically what you are wanting the cookie to be valid across mutliple hostnames on the same domain
This is certainly possible

From http://ellislab.com/codeigniter/user-gui...elper.html
Code:
$cookie = array(
                   'name'   => 'The Cookie Name',
                   'value'  => 'The Value',
                   'expire' => '86500',
                   'domain' => '.some-domain.com',
                   'path'   => '/',
                   'prefix' => 'myprefix_',
               );

set_cookie($cookie);

so if you set the domain parameter to '.domain.tld' it should work in both www and hosting-provider


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