I want to generate access code to the website I am making, and make it accessible only by that token. Now, I want the token to have particular information - email address, time +24hrs. I want to perform a cron job every hour to check whether those 24 hours have been reached and delete the token if it has.
I thought of using hash codes, but how can I retrieve information from a hash code? Is there such a function in php to decode a hash code? Because I couldn't find it...
If there isn't, what could be an alternative algorithm for generating access codes?
EDIT: I will use base64_encode(). Thanks