Prado\Web\UI\WebControls\TReCaptcha::recaptcha_get_html PHP Метод

recaptcha_get_html() приватный Метод

This is called from the browser, and the resulting reCAPTCHA HTML widget is embedded within the HTML form it was called from.
private recaptcha_get_html ( string $pubkey, string $error = null, boolean $use_ssl = false ) : string
$pubkey string A public key for reCAPTCHA
$error string The error given by reCAPTCHA (optional, default is null)
$use_ssl boolean Should the request be made over ssl? (optional, default is false)
Результат string - The HTML to be embedded in the user's form.
    private function recaptcha_get_html($pubkey, $error = null, $use_ssl = false)
    {
        $server = $use_ssl ? self::RECAPTCHA_API_SECURE_SERVER : ($server = self::RECAPTCHA_API_SERVER);
        $errorpart = '';
        if ($error) {
            $errorpart = "&error=" . $error;
        }
        return '<script type="text/javascript" src="' . $server . '/challenge?k=' . $pubkey . $errorpart . '"></script>
		<noscript>
		<iframe src="' . $server . '/noscript?k=' . $pubkey . $errorpart . '" height="300" width="500" frameborder="0"></iframe><br/>
		<textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
		<input type="hidden" name="recaptcha_response_field" value="manual_challenge"/>
		</noscript>';
    }