Re: please explane cookies.



Hello,
I try to understand cookies.
This is what I have and it's working.

cookies are variables stored in user pc (client) by server.
When client load the page first send to server the variable so
the server knows it.
This is how work cookies.
There are some data that make a cookie:
name for referring it
value ... of course!
the time of live of the valiable
the scope (visibility) of variable.

Think to cookie as an array of these value (name, value, time, scope...)
in client.

Said that there are some function:
setcookie is used to write the value toclient.
$_COOKIES[name_of_variable] for reading it

Probabli the difficult you find in this script i due to
the time of processing it:
The first time you call it just write th cookie.
from the second time the cookie is setted!


Ok, Thise I do understand.
I still have some questions.
Is it possible to set a cookie without a timestamp? (o it's always on the
computer. until the user ....)
When I the cookie is already setted, I like to use it. When I use it, i have
to set it. After setcookie, I use the last cookie setted file, but als I
overwrite that one with the new one. So the next time I use the cookie, I
have the settings of the last time.

Perhaps I have a answere by myself. Should it work?
I can checkabout the settings:
is setted? Y/N
Y? check language (is set in a cookie)
- NL= start a new PHP file with a setcookie with the settings for
language=NL.
- EN= ... etc.
N? give chooice and setcookie
But how do I do this?


.



Relevant Pages

  • Re: Chicken and egg issue with Cookie based login?
    ... >> Cookies are created by the server, not by the client. ... a client can create a cookie as well. ... The credentials are created when the user logs into the server. ...
    (comp.security.misc)
  • Re: If not readdir() then what?
    ... Please go read the NFS spec. ... The only thing an NFS client has in order ... filehandle and a cookie as its arguments. ... The server is expected to return cookies for _each_ ...
    (Linux-Kernel)
  • Re: Getting 12209 error on isa when server tries to connect to cookie enabled site. Xp workstation w
    ... and closed all handles to the original winhttp.dll on the win2003 server. ... This cookie is after an internal 302 redirect transmitted to the server ... First the client situation ... 2.The conclusion is that when Cookie header is sent from the server to ...
    (microsoft.public.isa)
  • Re: Cookie encryption?
    ... I'd like to encrypt the cookie on the client so ... could both encrypt the value and set the cookie via a HTTP-header ... available to the client; so he can only decrypt the cookie with it. ... scenario (and preferably done at the server). ...
    (comp.lang.javascript)
  • Re: error code 0x80072EFD
    ... [CallerId = AutomaticUpdates] ... cookie, reporting URL = ... the server with hr = 80072efd. ...
    (microsoft.public.windowsupdate)