note 116807 added to function.session-id

From: Date: Tue, 03 Mar 2015 06:20:19 +0000
Subject: note 116807 added to function.session-id
Groups: php.notes 
Request: Send a blank email to php-notes+get-201844@lists.php.net to get a copy of this message
session_id() URL-decodes the session value. For example let's say we use setcookie() to push a cookie down to a web browser. When the browser makes the next page request the browser sends the cookie back up to us with headers like this: Cookie: PHPSESSID=enGHumY%2C-2De-F-TDzNHVmE%2ChY5; If we use session_id() to read the cookie it will output a value of this: enGHumY,-2De-F-TDzNHVmE,hY5 The two values don't match! Use either setrawcookie() or URL encode if you wish to match the original value. ---- Server IP: 72.52.91.14 Probable Submitter: 71.177.216.6 ---- Manual Page -- http://php.net/manual/en/function.session-id.php Edit -- https://master.php.net/note/edit/116807 Del: integrated -- https://master.php.net/note/delete/116807/integrated Del: useless -- https://master.php.net/note/delete/116807/useless Del: bad code -- https://master.php.net/note/delete/116807/bad+code Del: spam -- https://master.php.net/note/delete/116807/spam Del: non-english -- https://master.php.net/note/delete/116807/non-english Del: in docs -- https://master.php.net/note/delete/116807/in+docs Del: other reasons-- https://master.php.net/note/delete/116807 Reject -- https://master.php.net/note/reject/116807 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#201844) next »