Ver Mensaje Individual
  #6 (permalink)  
Antiguo 20/07/2008, 13:04
Avatar de xbx
xbx
 
Fecha de Ingreso: mayo-2008
Ubicación: /home/xbx
Mensajes: 301
Antigüedad: 16 años
Puntos: 11
Respuesta: Cookies entre subdominios

Cita:
Iniciado por salbatore Ver Mensaje
Hola de nuevo...

Vengo ilusionado, jeje... menos mal... he visto que si lo creo de este modo, el cookie, funciona entre subdominios:

setcookie("usPass",$passN,time()+ 600,'/','.miweb.com');

Bueno... muchas gracias... espero sirva a algun despistado como yo, pues en castellano en google no lo encontre, me tuve que ir a http://www.techtoolblog.com/archives...-and-localhost .

Gracias...

Aqui estan los parametros de setcookie

bool setcookie ( string $name [, string $value [, int $expire [, string $path [, string $domain [, bool $secure [, bool $httponly ]]]]]] )

Y esta es la definicion de domain
Cita:
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.
Muy bueno! Eso no lo sabia...

Fuente: php.net

Gracias, he aprendido algo nuevo.