public function html()
    {
        if (!$this->getPublicKey()) {
            throw new Exception('You must set public key provided by reCaptcha');
        }

        $error = ($this->getError() ? '&amp;error=' . $this->getError() : null);

        $theme = null;

        // If user specified a reCaptcha theme, output it as one of the options
        if ($this->theme) {
            $theme = '<script> var RecaptchaOptions = {theme: "' . $this->theme . '"};</script>';
        }

        return $theme . '<script type="text/javascript" src="' . self::SERVER . '/challenge?k=' . $this->getPublicKey() . $error . '"></script>

        <noscript>
            <iframe src="' . self::SERVER . '/noscript?k=' . $this->getPublicKey() . $error . '" 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>';
    }