Skip to content
Advertisement

Tag: cookies

Can’t delete php set cookie

I’ve set a cookie through this call in php setcookie(‘alert_msg’, ‘you have the add badge’); I have tried unsetting it this way setcookie(‘alert_msg’, ”); setcookie(‘alert_msg’, false); setcookie(‘…

How can I encrypt a cookie value?

How can I encrypt, and later decrypt, a cookie value in PHP? How secure will the encryption be? Answer I can not simply think of a situation where encrypting data in the cookie is useful. If you want to retain secret data about the user or his preferences, information, whatever, then store it on the server in files, in the

php setcookie domain

Some application, not written by me, and not in PHP, creates a cookie for the domain “www.domain.com”. I am trying to replace that cookie. So in php I did: setcookie(‘mycookie’,’mydata’,time() + 2*7*…

What is PHPSESSID?

I’m playing around with cookies. And I dont have any cookies called PHPSESSID. Do i need it? Can i remove it? Whats the “function” of it? Prints: Answer PHP uses one of two methods to keep track of sessions. If cookies are enabled, like in your case, it uses them. If cookies are disabled, it uses the URL. Although this

PHP: Cookie domain / subdomain control

I’m working on a site with multiple subdomains, some of which should get their own session. I think I’ve got it worked out, but have noticed something about cookie handling that I don’t understand. I don’t see anything in the docs that explains it, so thought I would see if anyone here has some light to shed on the question.

Advertisement