Forum Moderators: coopster

Message Too Old, No Replies

whats the deal with session ids?

         

bobnew32

4:36 am on Aug 6, 2003 (gmt 0)

10+ Year Member



Why do alot of sites have session ids? I see www.yoursite.com/welcome.php?sid=239049238fj2kj23. What is up with that and why is it needed most of the time? Thanks alot.

dmorison

6:48 am on Aug 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi,

Best place to start is the PHP manual page on sessions:

[uk.php.net...]

If your application uses sessions there has to be some way to keep track of the session data associated with each user (since you may have many users on your site at the same time).

PHP normally uses a cookie to hold the session ID; if cookies are not an option it uses a URL parameter instead, which is what you are seeing.

Both of these are done by PHP "on its own" - the programmer does not need to worry about it.

brotherhood of LAN

7:41 am on Aug 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



>>>PHP normally uses a cookie to hold the session ID; if cookies are not an option it uses a URL parameter instead, which is what you are seeing.

And the next question usually is how do you get rid of them! They are troublesome for crawlers, so maybe this is why they get that little bit extra coverage in the forums.

There's plenty threads relating to taht subject in this very forum, you might want to check them out, and a couple of similar ones to this.....(not sure if any are in the library)