Check()) { // If Check goes right, the page have got the right token. echo "Allright, the token is fine!"; } else { // Else, there is some error.. // We can catch the error with the Error method. // It returns an integer error code; see the documentation to find out the meanings of the various codes. switch($T->Error()) { case 1: { echo "No Request Token detected."; break; } case 2: { echo "No Session Token corrisponding to the Request Token."; break; } case 3: { echo "No value for the Session Token."; break; } case 4: { echo "Token reached the timeout."; break; } } } // Now, let's print a link to this page using the token! echo "
protectLink("example.php")."\">Retry using the session token!"; ?>