Pass Phpsessid In Url

I have a question about Cookie and Session.

I need a guideline to solve this problem.

can i pass PHPSESSID in URL

example

www.example.com/news?PHPSESSID=abcdefg

because i don’t care about cookie disable or not.

can i solve by programmatic way not by server configuration.(TransparentSessionID)

what’s yii class file can i override. CHttpSession?

i think, i need to know where is YII hook PHPSESSID

and i will modify like this




$mySID = null;

if(PHPSESSID_BY_COOKIE == NULL){

     $mySID = $_GET['PHPSESSID_BY_URL'];

}



sorry about my bad english.

Thank you.

Dear Friend

You can add the value of cookie PHPSESSID as GET parameters in url rules in main.php.




'urlManager'=>array(

	'urlFormat'=>'path',

	'showScriptName'=>true,

	'rules'=>array(		


'user<id:\d+>'=>array('user/view','defaultParams'=>array('sessId'=>$_COOKIE['PHPSESSID'])),

 '<controller:\w+>/<action:\w+>'=>'<controller>/<action>',	

								

			),



Then we get back.




$_GET['sessId']



Thus we can customize it to particular url.

One important thing to keep in mind is every time an user logs out and logs in entire session is regenerated.

So PHPSESSID value will not remain unchanged even if user is does not close browser.

also to see this extension : forgery-session-filter :lol: