PHP. Руководство по PHP. 2005
session_id
session_id
Описание
string session_id ([string id])session_id() is used to get or set the session id for the current session.
The constant SID can also be used to retrieve the current name and session id as a string suitable for adding to URLs. Note that SID is only defined if the client didn't send the right cookie. See also Session handling.