You are here

function recaptcha_mailhide_url in reCAPTCHA 8

Same name and namespace in other branches
  1. 5.2 recaptcha/recaptchalib.php \recaptcha_mailhide_url()
  2. 6 recaptcha-php-1.11/recaptchalib.php \recaptcha_mailhide_url()
  3. 7 recaptcha-php-1.11/recaptchalib.php \recaptcha_mailhide_url()
1 call to recaptcha_mailhide_url()
recaptcha_mailhide_html in recaptcha-php-1.11/recaptchalib.php
Gets html to display an email address given a public an private key. to get a key, go to:

File

recaptcha-php-1.11/recaptchalib.php, line 230

Code

function recaptcha_mailhide_url($pubkey, $privkey, $email) {
  if ($pubkey == '' || $pubkey == null || $privkey == "" || $privkey == null) {
    die("To use reCAPTCHA Mailhide, you have to sign up for a public and private key, " . "you can do so at <a href='http://www.google.com/recaptcha/mailhide/apikey'>http://www.google.com/recaptcha/mailhide/apikey</a>");
  }
  $ky = pack('H*', $privkey);
  $cryptmail = _recaptcha_aes_encrypt($email, $ky);
  return "http://www.google.com/recaptcha/mailhide/d?k=" . $pubkey . "&c=" . _recaptcha_mailhide_urlbase64($cryptmail);
}