bool scache_status(resource session)
scache_status verifies the session given in session.
TRUE on if valid, FALSE on failure.
In case of failure, error codes resolvable by scache_lasterr is one of below :
- SCERR_NO_SESSION Connected session does not exist or has been expired. Connection is not valid any more.
- SCERR_NOT_CONNECTED Connection to backend is broken and cannot be reconnected.
- SCERR_PROTOCOL Internal protocol error has occurred when communicating to backend. This indicates something is severely broken.
<?php /* we do have a session */ $session = scache_reset('MyEasilyGuessableSecret'); /* and we still have the session */ scache_status($session) or die('Someone stole my session!!'); ?>