当前位置: 首页>>代码示例>>PHP>>正文


PHP _recaptcha_mailhide_email_parts函数代码示例

本文整理汇总了PHP中_recaptcha_mailhide_email_parts函数的典型用法代码示例。如果您正苦于以下问题:PHP _recaptcha_mailhide_email_parts函数的具体用法?PHP _recaptcha_mailhide_email_parts怎么用?PHP _recaptcha_mailhide_email_parts使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了_recaptcha_mailhide_email_parts函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: replace_plaintext

 function replace_plaintext($matches)
 {
     if ($this->options['replace_link_with'] == "" && $this->options['replace_title_with'] == "") {
         // find plain text emails and hide them
         $html = recaptcha_mailhide_html($this->options['public_key'], $this->options['private_key'], $matches[0]);
     } else {
         // replace both things
         if ($this->options['replace_link_with'] != "" && $this->options['replace_title_with'] != "") {
             $url = recaptcha_mailhide_url($this->options['public_key'], $this->options['private_key'], $matches[0]);
             $html = "<a href='" . htmlentities($url, ENT_QUOTES) . "' onclick=\"window.open('" . htmlentities($url, ENT_QUOTES) . "', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;\" title=\"" . $this->options['replace_title_with'] . "\">" . $this->options['replace_link_with'] . "</a>";
         } else {
             if ($this->options['replace_link_with'] != "" && $this->options['replace_title_with'] == "") {
                 $url = recaptcha_mailhide_url($this->options['public_key'], $this->options['private_key'], $matches[0]);
                 $html = "<a href='" . htmlentities($url, ENT_QUOTES) . "' onclick=\"window.open('" . htmlentities($url, ENT_QUOTES) . "', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;\" title=\"Reveal this e-mail address\">" . $this->options['replace_link_with'] . "</a>";
             } else {
                 if ($this->options['replace_link_with'] == "" && $this->options['replace_title_with'] != "") {
                     $url = recaptcha_mailhide_url($this->options['public_key'], $this->options['private_key'], $matches[0]);
                     $emailparts = _recaptcha_mailhide_email_parts($matches[0]);
                     $html = htmlentities($emailparts[0], ENT_QUOTES) . "<a href='" . htmlentities($url, ENT_QUOTES) . "' onclick=\"window.open('" . htmlentities($url, ENT_QUOTES) . "', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;\" title=\"" . $recaptcha_opt['replace_title_with'] . "\">...</a>@" . htmlentities($emailparts[0], ENT_QUOTES);
                 }
             }
         }
     }
     // style it
     $html = '<span class="mh-email">' . $html . "</span>";
     return $html;
 }
开发者ID:vpatrinica,项目名称:jfdesign,代码行数:27,代码来源:mailhide.php

示例2: recaptcha_mailhide_html

/**
 * Gets html to display an email address given a public an private key.
 * to get a key, go to:
 *
 * http://www.google.com/recaptcha/mailhide/apikey
 */
function recaptcha_mailhide_html($pubkey, $privkey, $email)
{
    $emailparts = _recaptcha_mailhide_email_parts($email);
    $url = recaptcha_mailhide_url($pubkey, $privkey, $email);
    return htmlentities($emailparts[0]) . "<a href='" . htmlentities($url) . "' onclick=\"window.open('" . htmlentities($url) . "', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;\" title=\"Reveal this e-mail address\">...</a>@" . htmlentities($emailparts[1]);
}
开发者ID:naveensnayak,项目名称:recaptcha,代码行数:12,代码来源:recaptchalib.php

示例3: recaptcha_mailhide_html

/**
 * Gets html to display an email address given a public an private key.
 * to get a key, go to:
 *
 * http://www.google.com/recaptcha/mailhide/apikey
 */
function recaptcha_mailhide_html($pubkey, $privkey, $email)
{
    if ($pubkey == '' || $pubkey == null || $privkey == "" || $privkey == null) {
        return "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>";
    }
    if (!function_exists("mcrypt_encrypt")) {
        return "To use reCAPTCHA Mailhide, you need to have the mcrypt php module installed.";
    }
    $emailparts = _recaptcha_mailhide_email_parts($email);
    $url = recaptcha_mailhide_url($pubkey, $privkey, $email);
    return htmlentities($emailparts[0]) . "<a href='" . htmlentities($url) . "' onclick=\"window.open('" . htmlentities($url) . "', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;\" title=\"Reveal this e-mail address\">...</a>@" . htmlentities($emailparts[1]);
}
开发者ID:poef,项目名称:ariadne,代码行数:18,代码来源:recaptchalib.php

示例4: recaptcha_mailhide_html

/**
 * Gets html to display an email address given a public an private key.
 * to get a key, go to:
 *
 * http://mailhide.recaptcha.net/apikey
 */
function recaptcha_mailhide_html($pubkey, $privkey, $email, $html) {
	
	// pro memoria : $html = array($id, $title, $target, $classification, $hreflang, $content);
	if(strlen($html[0]) > 0) 
	{
		$id = $html[0];
	}
	$title = 'Reveal this e-mail address';
	if(strlen($html[1]) > 0) 
	{
		$title = $html[1];
	}
		
	if(strlen($html[2]) > 0) 
	{
		$target = $html[2];
	}
	
	if(strlen($html[3]) > 0) 
	{
		$cssclass = $html[3];
	}
	
	if(strlen($html[4]) > 0) 
	{
		$hreflang = $html[4];
	}
	
	if(strlen($html[5]) > 0) 
	{
		$content = $html[5];
	}		

	$url = recaptcha_mailhide_url ($pubkey, $privkey, $email);
	
	if( !filter_var($content, FILTER_VALIDATE_EMAIL)) // using php >= 5.2, makes sure it's not an email 
	{		
		$parts[0] = $content; // raw link label from content text
		$html = '';
	} 
	else 
	{
		$parts = _recaptcha_mailhide_email_parts ($email);
		$html = htmlentities($parts[0]);
	}	
	
	$html .= "<a ";
	if(isset($id))
	{
		$html .= "id='" . $id . "' "; 
	}
	if(isset($cssclass))
	{
		$html .= "class='" . $cssclass . "' "; 
	}
	if(isset($target))
	{
		$html .= "target='" . $target . "' "; 
	}
	if(isset($hreflang))
	{
		$html .= "hreflang='" . $hreflang . "' ";
	}
	$html .= "href='" . htmlentities ($url). "' ";
	$html .= "onclick=\"window.open('" . htmlentities ($url) . "', '', ";
	$html .= "'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;\" ";
	
	// if link label is an email
	if(count($parts) > 1)
	{
		$html .= "title=\"" . $title . "\">...</a>";
		$html .= '@' . htmlentities ($parts[1]);
	}
	else 
	{
		$html .= "title=\"" . $title . "\">". $parts[0] . "</a>"; // raw link label from content text 	
	}
	return $html;

}
开发者ID:ronanguilloux,项目名称:rgMailHide,代码行数:86,代码来源:recaptchalib.php

示例5: recaptcha_mailhide_html

/**
 * Gets html to display an email address given a public an private key.
 * to get a key, go to:
 *
 * http://mailhide.recaptcha.net/apikey
 */
function recaptcha_mailhide_html($pubkey, $privkey, $email)
{
    $emailparts = _recaptcha_mailhide_email_parts($email);
    $url = recaptcha_mailhide_url($pubkey, $privkey, $email);
    return htmlentities($emailparts[0]) . '<a href="' . htmlentities($url) . '" onclick="window.open("' . htmlentities($url) . '", "", "toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300"); return false;" title="Reveal this e-mail address">...</a>@' . htmlentities($emailparts[1]);
}
开发者ID:nocoolnametom,项目名称:OpenMicNight,代码行数:12,代码来源:recaptchaHelper.php

示例6:

<?php
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:1,代码来源:recaptchalib.php


注:本文中的_recaptcha_mailhide_email_parts函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。