Link to home
Start Free TrialLog in
Avatar of sf0a
sf0a

asked on

Closing a session and opening a new one

In my script I am making sure the user is authentic by storing their IP address in the session when it's created and checking it against their IP address on each page subsequently.  The reason for this is to stop people passing along a URL to a friend with the session ID and that friend getting access to their information (I cannot use cookie sessions).

The problem is this.  If the IP addresses don't match up I want to create a new seperate session for this different user.  There doesn't seem to be an easy way to do this, in essence what I need is a session_stop() function so I can genereate my own ID set it with session_id() then run session_start() again to create the new session.
ASKER CERTIFIED SOLUTION
Avatar of jkna_gunn
jkna_gunn

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial