You are here

function _botcha_get_token in BOTCHA Spam Prevention 6

Same name and namespace in other branches
  1. 7 botcha.botcha.inc \_botcha_get_token()

Custom token (session) management for anonymous users.

2 calls to _botcha_get_token()
_botcha_set_form_cache in ./botcha.botcha.inc
BOTCHA cache functions - set, get, clear
_botcha_valid_token in ./botcha.botcha.inc

File

./botcha.botcha.inc, line 686
Implementation of botcha form logic.

Code

function _botcha_get_token($value = '') {
  if (empty($_SESSION['botcha_session'])) {
    $_SESSION['botcha_session'] = session_id();
  }
  return md5($value . $_SESSION['botcha_session'] . drupal_get_private_key());
}