Forum Moderators: coopster

Message Too Old, No Replies

cookies and sessions on https

accessing https cookies and sessions on http

         

kadnan

2:48 am on Aug 22, 2008 (gmt 0)

10+ Year Member



Can a cookie generated on [domain.com...] would be accessible on [domain.com...] or [sub.domain.com...]

PHP_Chimp

7:16 pm on Aug 26, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



cookies from an [example.com...] would not be available on http://example.com as these are a different protocol and different domains, so in essence completely separate.

Subdomains is fine;


[url=http://uk.php.net/manual/en/function.setcookie.php]setcookie[/url]('name', 'value', time()+600, '/', '[b].[/b]example.com', false, true);

The setcookie page explains how to make the domain available for all subdomains.