View Single Post
  #25  
Old 22nd June 2018, 02:50
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 2,113
Default
ok lets start all this from the begining
#1 you must have a V2 puplic and private key!!!!!!!!
#2 the site you are testing this on MUST be setup in
Your reCAPTCHA sites

open
ajax/forgot_password.php and find
Code:
if( !$verifyCaptcha->verifyCaptcha($recaptcha_challenge_field, $recaptcha_response_field) )
and make it
Code:
        if( !$verifyCaptcha->verifyCaptcha($recaptcha_challenge_field, $_POST["g-recaptcha-response"]) )
now open ajax/signup.php and do the same find
Code:
if( !$verifyCaptcha->verifyCaptcha($recaptcha_challenge_field, $recaptcha_response_field) )
and make it
Code:
        if( !$verifyCaptcha->verifyCaptcha($recaptcha_challenge_field, $_POST["g-recaptcha-response"]) )
open library/classes/class_captcha.php
and replace the content with
Code:
<?php 

class TSUE_captcha
{
    private $apiURL = "https://www.google.com/recaptcha/api/siteverify?secret=";
    private $privatekey = "";//PUT YOUR PRIVATE KEY HERE
    public $status = false;
    public $error = "";

    public function verifyCaptcha($recaptcha_challenge_field = "", $recaptcha_response_field = "")
    {
        global $_POST;
                $ip = $_SERVER['REMOTE_ADDR'];
                $response=file_get_contents($this->apiURL.$this->privatekey."&response=".$recaptcha_response_field."&remoteip=".$ip);
                $responseKeys = json_decode($response,true);         
                $this->status = intval($responseKeys["success"]) !== 1 ? false : true;
                if(!$this->status)
                {
                    $this->error = $responseKeys['error-codes'][0];
                }

        return $this->status;
    }

}
?>
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent
Do not ask me to make a mod for any other source
Do not Ask me to setup your site.
I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Manager™ forum
My Current Demo is here http://demo.btmanager.org/
Reply With Quote
The Following 3 Users Say Thank You to joeroberts For This Useful Post:
BamBam0077 (22nd June 2018), Botanicar (22nd June 2018), papad (22nd June 2018)