note 72180 deleted from function.setcookie by cmb
| From: | cmb@php.net | Date: | Sun, 10 Nov 2019 12:49:39 +0000 |
| Subject: | note 72180 deleted from function.setcookie by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-213004@lists.php.net to get a copy of this message | ||
Note Submitter:
----
If you ever find yourself in a situation where you need to overwrite a non-PHP application's
session cookie, you can do that with the following line:
<?php
header("Set-Cookie: SIDNAME=$overwrite; path=/; secure");
?>
I couldn't get setcookie() to do this for all major web browsers, but manually sending the
header did the trick. Note: Remove secure if you aren't mandating SSL connections.