Page 1 of 1
Appending PHPSESSID
Posted: Sun May 16, 2004 10:54 am
by HaVoC
IS there a command to add the PHPSESSID to every link clicked?
I've seen a command before that appends the session id, I don't remember it anymore...does anyone know what command i'm looking for?
Posted: Sun May 16, 2004 11:35 am
by d3ad1ysp0rk
Posted: Sun May 16, 2004 3:08 pm
by HaVoC
So then I can keep a user logged in
Posted: Sun May 16, 2004 3:09 pm
by HaVoC
THanks
Posted: Sun May 16, 2004 3:27 pm
by delorian
If you're using sessions for user loggin it's better not to parse session id through link, but if really want to - read about session.use_trans_sid
http://us2.php.net/manual/en/ref.session.php or try the following function:
Code: Select all
function add_sessid($url)
{
if(!preg_match("|".session_name()."=".session_id()."|i", $url)) {
return $url."&".session_name()."=".session_id();
} else {
return $url;
}
}
I did not test it.
Posted: Sun May 16, 2004 9:25 pm
by Steveo31
What delorian said... trans_sid is much easier to handle and you don't need to append it to every link.
Posted: Sun May 16, 2004 9:30 pm
by d3ad1ysp0rk
Also, the user will be kept in no matter what, as long as you set the sessions properly.
No need to fiddle with session_id
Posted: Sun May 16, 2004 9:30 pm
by tim
I would disbable trans_id for security issues.
Just inform your customers that they are required to enable cookies.
Posted: Mon May 17, 2004 5:11 pm
by HaVoC
Thanks for the help guys! I am also wondering, is there a command that counts how many sessions that have been started on my site?