manual/en/features.cookies.php

ARCHIVED 2009-06-27, DATE APPROXIMATE · VERSION 20090627_rev01 · COMPARED WITH 20090215_rev01

Full text changes — 20090215_rev01 to 20090627_rev01

COLOUR MARKS THE SEVERITY OF A FLAGGED CLAUSE · + AND − MARK ADDED AND REMOVED

66
77For more details, including notes on browser bugs, see the [setcookie()](http://www.php.net/manual/en/function.setcookie.php) and [setrawcookie()](http://www.php.net/manual/en/function.setrawcookie.php) function.
88
99 [add a note](http://www.php.net/manual/add-note.php) User Contributed Notes
1010**Cookies**
1111
12**Henry**
13[08-May-2009 02:15](http://www.php.net/manual/en/features.cookies.php)
14
15`It is better to note not to attach your cookies to and IP and block the IP if it is different as some people use Portable Browsers which will remember the cookies. It is better to show a login screen instead if the IP does not correspond to the session cookie's IP.`
16
1217**ingen at stocken.ws**
1318[19-Nov-2006 08:26](http://www.php.net/manual/en/features.cookies.php)
1419
1520`If you want a secured session not tied to the client IP you can use the valid-for-one-query method below, but to safeguard against a scenario where the legitimate user clicks twice, you can use a shutdown function (register_shutdown_function)*.`
1621
1722`It will check to see if the script terminated prematurely (connection_aborted), and reset the valid session ID. That way, it's still valid when the user makes the second request. If the script ends properly, the new session ID will be used instead.`