function _recaptcha_mailhide_email_parts in reCAPTCHA 5.2
Same name and namespace in other branches
- 8 recaptcha-php-1.11/recaptchalib.php \_recaptcha_mailhide_email_parts()
- 6 recaptcha-php-1.11/recaptchalib.php \_recaptcha_mailhide_email_parts()
- 7 recaptcha-php-1.11/recaptchalib.php \_recaptcha_mailhide_email_parts()
gets the parts of the email to expose to the user. eg, given johndoe@example,com return ["john", "example.com"]. the email is then displayed as john...@example.com
1 call to _recaptcha_mailhide_email_parts()
- recaptcha_mailhide_html in recaptcha/
recaptchalib.php - Gets html to display an email address given a public an private key. to get a key, go to:
File
- recaptcha/
recaptchalib.php, line 248
Code
function _recaptcha_mailhide_email_parts($email) {
$arr = preg_split("/@/", $email);
if (strlen($arr[0]) <= 4) {
$arr[0] = substr($arr[0], 0, 1);
}
else {
if (strlen($arr[0]) <= 6) {
$arr[0] = substr($arr[0], 0, 3);
}
else {
$arr[0] = substr($arr[0], 0, 4);
}
}
return $arr;
}