<commit_before><?php namespace Anhskohbo\NoCaptcha;

class NoCaptcha {

	const CLIENT_API = 'https://www.google.com/recaptcha/api.js';
	const VERIFY_URL = 'https://www.google.com/recaptcha/api/siteverify';

	/**
	 * //
	 * 
	 * @var string
	 */
	protected $secret;

	/**
	 * //
	 * 
	 * @var string
	 */
	protected $sitekey;

	/**
	 * //
	 * 
	 * @var string
	 */
	protected $lang;

	/**
	 * //
	 * 
	 * @param string $secret
	 * @param string $sitekey
	 */
	public function __construct($secret, $sitekey, $lang = null)
	{
		$this->lang = $lang;

		$this->secret = $secret;

		$this->sitekey = $sitekey;
	}

	/**
	 * //
	 * 
	 * @return string
	 */
	public function display($attributes = array())
	{
		$attributes['data-sitekey'] = $this->sitekey;

		$html  = '<script src="'.$this->getJsLink().'"></script>'."\n";
		$html .= '<div class="g-recaptcha"'.$this->buildAttributes($attributes).'></div>';

		return $html;
	}

	/**
	 * //
	 * 
	 * @param  string $response
	 * @param  string $clientIp
	 * @return bool
	 */
	public function verifyResponse($response, $clientIp = null)
	{
		if (empty($response)) return false;

		$response = $this->sendRequestVerify(array(
			'secret'   => $this->secret,
			'response' => $response,
			'remoteip' => $clientIp<commit_msg>Load non-blocking api.<commit_after><?php namespace Anhskohbo\NoCaptcha;

class NoCaptcha {

	const CLIENT_API = 'https://www.google.com/recaptcha/api.js';
	const VERIFY_URL = 'https://www.google.com/recaptcha/api/siteverify';

	/**
	 * //
	 * 
	 * @var string
	 */
	protected $secret;

	/**
	 * //
	 * 
	 * @var string
	 */
	protected $sitekey;

	/**
	 * //
	 * 
	 * @var string
	 */
	protected $lang;

	/**
	 * //
	 * 
	 * @param string $secret
	 * @param string $sitekey
	 */
	public function __construct($secret, $sitekey, $lang = null)
	{
		$this->lang = $lang;

		$this->secret = $secret;

		$this->sitekey = $sitekey;
	}

	/**
	 * //
	 * 
	 * @return string
	 */
	public function display($attributes = array())
	{
		$attributes['data-sitekey'] = $this->sitekey;

		$html  = '<script src="'.$this->getJsLink().' async defer"></script>'."\n";
		$html .= '<div class="g-recaptcha"'.$this->buildAttributes($attributes).'></div>';

		return $html;
	}

	/**
	 * //
	 * 
	 * @param  string $response
	 * @param  string $clientIp
	 * @return bool
	 */
	public function verifyResponse($response, $clientIp = null)
	{
		if (empty($response)) return false;

		$response = $this->sendRequestVerify(array(
			'secret'   => $this->secret,
			'response' => $response,
			'remoteip' => $clientIp
{'fraction_non_alphanumeric': 0.1991375931007448, 'fraction_numerical': 0.0, 'mean_word_length': 2.908116385911179, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 33, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3990866', 'n_tokens_mistral': 1001, 'n_tokens_neox': 890, 'n_words': 167}