Back to Home: PHP FormMail Generator I Need Help : Ask Question Without Registration

My form runs on HTTPS, but reCaptcha security image doesn't appear in Chrome, why?
  • Form User June 2013
    Your form is running on HTTPS (SSL) layer, but the reCaptcha security image uses normal HTTP protocol, so the image is blocked by Chrome. You have to use HTTPS for reCaptcha security image.

    Edit form.lib.php, replace this line of code:

    function phpfmg_show_captcha(){
        if( phpfmg_is_reCAPTCHA() ){
            echo recaptcha_get_html(reCAPTCHA_PUBLIC_KEY);
            return ;
        };
        $url = PHPFMG_ADMIN_URL . '?mod=captcha&func=get&tid=' ;
        $onclick= "onclick=\"document.getElementById('phpfmg_captcha_image').src='{$url}'+Math.random();return false;\" " ;
        echo "<a href='http://www.formmail-maker.com' {$onclick} title=\"Free Mail Form Tool\"><img id=\"phpfmg_captcha_image\" src=\"". $url . time() ."\"  border=0 style=\"cursor:pointer;\" alt=\"Click the image to reload. PHP FormMail Generator at http://phpfmg.sourceforge.net\"></a>\n";
        echo "<a href='http://phpfmg.sourceforge.net' {$onclick} style=\"color:#474747;\" title=\"Reload PHP FormMail Generator Security Image\" >Reload Image</a><br>\n";
        echo "<input type='text' name='fmgCaptchCode' value='' class='fmgCaptchCode' style='width:73px;' >\n";
    }


    With : 

    function phpfmg_show_captcha(){
        if( phpfmg_is_reCAPTCHA() ){
            echo recaptcha_get_html(reCAPTCHA_PUBLIC_KEY, null, true);
            return ;
        };
        $url = PHPFMG_ADMIN_URL . '?mod=captcha&amp;func=get&amp;tid=' ;
        $onclick= "onclick=\"document.getElementById('phpfmg_captcha_image').src='{$url}'+Math.random();return false;\" " ;
        echo "<a href='http://www.formmail-maker.com' {$onclick} title=\"Free Mail Form Tool\"><img id=\"phpfmg_captcha_image\" src=\"". $url . time() ."\"  border=0 style=\"cursor:pointer;\" alt=\"Click the image to reload. PHP FormMail Generator at http://phpfmg.sourceforge.net\"></a>\n";
        echo "<a href='http://phpfmg.sourceforge.net' {$onclick} style=\"color:#474747;\" title=\"Reload PHP FormMail Generator Security Image\" >Reload Image</a><br>\n";
        echo "<input type='text' name='fmgCaptchCode' value='' class='fmgCaptchCode' style='width:73px;' >\n";
    }

    Save the form.lib.php file, and upload it back to your server. It should work.