note 88296 deleted from function.session-name by danbrown

From: Date: Mon, 19 Jan 2009 17:03:53 +0000
Subject: note 88296 deleted from function.session-name by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-149468@lists.php.net to get a copy of this message
Note Submitter: darsstar at gmail dot com ---- @php at wiz dot cx since you set the name of the session to 'example.com' php will look for $_COOKIE['example.com']. yes, example.com will be converted to example_com. but if you manualy create $_COOKIE['example.com'] containing the value of $_COOKIE['example_com'] then you repaired it (since it 'broke'). this way you can also create multiple cookies wich PHP will read as an array. <?php $_COOKIE['PHPSESSID[0]'] session_name('PHPSESSID[0]'); session_start(); // cookie will be sent like this: PHPSESSID%5B0%5D=d8384e0e0278a8d31186839f5f73374a ?> this way you can add dummy session id. or you could actualy use the extra information. like more parameters to authenticate an user and have php's foreach loop through the array. just some thoughts i liked to share

« previous php.notes (#149468) next »