~ramus

setcookie ("TestCookie", "", time() - 3600, "[COLOR="red"]/~rasmus/[/COLOR]", ".example.com", 1);

The code above is from an example2 in the manual
What does “/~rasmus/” mean?

Hi, as you can see in the manual the fourth parameter is path:

The path on the server in which the cookie will be available on. If set to ‘/’, the cookie will be available within the entire domain. If set to ‘/foo/’, the cookie will only be available within the /foo/ directory and all sub-directories such as /foo/bar/ of domain. The default value is the current directory that the cookie is being set in.

Thank you, Alan.

setcookie ("TestCookie", "", time() - 3600, "/~rasmus/", ".example.com", [COLOR="Red"]1[/COLOR]);

Since value is in the 2nd parameter like the following, I think, the last one “1” is not a value.

setcookie ("TestCookie", "[COLOR="Red"]$value[/COLOR]", time() - 3600, "/~rasmus/", ".example.com", 1);

What is the meaning of the last one “1”?

The sixth parameter “1” (bool true) indicates that the cookie should only be transmitted over a secure HTTPS connection from the client.