PHP 5: Security authorization
Ivan Priorov (contact me)
This class can be used to validate sessions with cookie values.
It can start a session and store a variable with a value that is also encrypted and set to a cookie.
If the cookie has expired or the decrypted cookie value different than the session variable value, the session is destroyed and the user is redirected to an authentication page.
The class can regenerate and verify the cookie value on every page to avoid session stealing.
Click here for detailed information about this class on phpclasses.org