Forum Moderators: coopster
I'd be doing somthing like this if you cared to know (i'm just throwing this out, i'm not asking somone to fill in the blanks, only the if statment to see if cookies are available.
if(cookies are available)
{
do session junk
}if(cookies are not available)
{
append session id
}
BTW, it's my understanding that you can have PHP do this automatically if your settings are right.
session.use_cookies boolean
session.use_cookies specifies whether the module will use cookies to store the session id on the client side. Defaults to 1 (enabled).session.use_only_cookies boolean
session.use_only_cookies specifies whether the module will only use cookies to store the session id on the client side. Defaults to 0 (disabled, for backward compatibility). Enabling this setting prevents attacks involved passing session ids in URLs. This setting was added in PHP 4.3.0.
So by default if it can't set a cookie then it will append it in the URL. Just have to be aware of the possibility of session hijacking.