Appending PHPSESSID
Moderator: General Moderators
Appending PHPSESSID
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?
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?
-
d3ad1ysp0rk
- Forum Donator
- Posts: 1661
- Joined: Mon Oct 20, 2003 8:31 pm
- Location: Maine, USA
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:
I did not test it.
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;
}
}-
d3ad1ysp0rk
- Forum Donator
- Posts: 1661
- Joined: Mon Oct 20, 2003 8:31 pm
- Location: Maine, USA