View Full Version : use_trans_sid question

07-05-2007, 05:49 PM
First, this isn't a question of what it is or how it works, lol.
I'm more curious as to if anyone knows how it works in php. As in, what does the engine do to parse the passing of SID into the urls? I'm curious as I want to eliminate my use of Session id passing in my urls with my custom session script, but still have it automatically append (including differentiation between ? and & choice) to the url. The best I've come up with so far is the use of regexp with a templating engine, however, this does seem to be a little too intensive for what I want, easily increasing the loadtime by 0.5-3 seconds just to match the links. PHP builtin session seems to be much faster.
Any ideas as to what they do to perform this, and if so, can I manipulate the same proceedures (crosses fingers for a non final class :))

07-05-2007, 07:09 PM
For what purpose have you written your own session handling? There are only so many different kinds of wheels that need to be invented.

If this is to provide your own session data storage engine, you should look at session_set_save_handler() http://php.net/session_set_save_handler to register your own storage functions but use PHP's built in session handling, which would include all of the built in transparent SID handling as well.