#1 28.12.07 15:31
cookies php
Подскажите как можно сделать 1 куку работающею на поддоменах
site.ru
host.site.ru
host1.site.ru
host2.site.ru
каким образом её извлечь?
вот я отправил обычную куку
а вот я её извлек
Код: php:
$cookies=$_COOKIE['cookies']; echo $cookies;
Хотелбы в результате получить чтото типа как на alltopix.ru у них 1 кука на все поддомены.
Исправлено M16 (28.12.07 15:31)
Offline
#2 28.12.07 15:49
Re: cookies php
ну, ты доку на функцию смотри...
Код: php:
bool setcookie ( string $name [, string $value [, int $expire [, string $path [, string $domain [, bool $secure [, bool $httponly ]]]]]] )
domain
The domain that the cookie is available. To make the cookie available on all subdomains of example.com then you'd set it to '.example.com'. The . is not required but makes it compatible with more browsers. Setting it to www.example.com will make the cookie only available in the www subdomain. Refer to tail matching in the » spec for details.
Offline

