Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $token = substr( md5( microtime() ), -12 );
- $token = base64_encode ( $email ); // The users email will be encoded
- $emailToken = base64_decode( $_GET['t'] ); // Contains the users email
- if ( base64_encode( base64_decode( $_GET['t'] ) ) === $_GET['t'] ) {
- // Valid base64... we hope but is it a valid email?
- $emailToken = filter_var( base64_decode( $_GET['t'] ), FILTER_SANITIZE_EMAIL );
- if ( filter_var( $emailToken, FILTER_VALIDATE_EMAIL ) ) {
- // Email is valid. Do something to call email info
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement