#! /usr/bin/env php token . "\n"; echo $boincToken->userid . "\n"; echo $boincToken->type . "\n"; echo $boincToken->create_time . "\n"; echo $boincToken->expire_time . "\n"; } echo "---------------\n"; $boincToken = BoincToken::lookup("userid=0"); echo $boincToken->token . "\n"; echo $boincToken->userid . "\n"; echo $boincToken->type . "\n"; echo $boincToken->create_time . "\n"; echo $boincToken->expire_time . "\n"; echo "---------------\n"; $boincToken = BoincToken::lookup_valid_token(0, $token, 'T'); if ( $boincToken != null ) { echo "Found valid token\n"; } echo "---------------\n"; $boincToken = BoincToken::lookup_valid_token(0, 'notrealtoken', 'T'); if ( $boincToken == null ) { echo "Successfully didn't find invalid token\n"; } echo "---------------\n"; $user = new BoincUser(); $user->id=0; $token = create_token($user->id, TOKEN_TYPE_DELETE_ACCOUNT, TOKEN_DURATION_ONE_DAY); if ( is_valid_token($user->id, $token, TOKEN_TYPE_DELETE_ACCOUNT) ) { echo "Successfully created and validated delete account token"; } ?>