Tema: Contador PHP
Ver Mensaje Individual
  #11  
Antiguo 22-02-2008
Avatar de dec
dec dec is offline
Moderador
 
Registrado: dic 2004
Ubicación: Alcobendas, Madrid, España
Posts: 13.107
Reputación: 34
dec Tiene un aura espectaculardec Tiene un aura espectacular
Hola,

Cita:
Empezado por keyboy
Quizá la idea de entrar mediante www.tusitio.com/nocontarme.php pueda facilitarse un poco si se usa una variable de sesión en lugar de una cookie ya que de esta forma no hay que preocuparse por borrar la cookie al terminar.
Pues no está mal visto. Aunque las "cookies" también expiran al terminar la sesión, sino se especifica otra cosa:

Cita:
Empezado por setcookie
The time the cookie expires. This is a Unix timestamp so is in number of seconds since the epoch. In other words, you'll most likely set this with the time() function plus the number of seconds before you want it to expire. Or you might use mktime(). time()+60*60*24*30 will set the cookie to expire in 30 days. If set to 0, or omitted, the cookie will expire at the end of the session (when the browser closes).
Más información en el manual de PHP.
__________________
David Esperalta
www.decsoftutils.com
Responder Con Cita