View Single Post
  #7  
Old 17th June 2018, 12:24
bigjohn bigjohn is offline
Member
 
Join Date: May 2018
Posts: 2
Default
Quote:
Originally Posted by TraceR View Post
this is tsue captcha class


Code:

<?php 

class TSUE_captcha
{
    private $apiURL = "https://www.google.com/recaptcha/api/verify";
    private $privatekey = "6LfHFTQUAAAARFGHTDGGOyBEj7S";
    public $status = false;
    public $error = "";

    public function verifyCaptcha($recaptcha_challenge_field = "", $recaptcha_response_field = "")
    {
        $Query = http_build_query(array( "privatekey" => $this->privatekey, "remoteip" => MEMBER_IP, "challenge" => $recaptcha_challenge_field, "response" => $recaptcha_response_field ));
        if( function_exists("curl_init") && ($ch = curl_init()) ) 
        {
            curl_setopt($ch, CURLOPT_URL, $this->apiURL);
            curl_setopt($ch, CURLOPT_TIMEOUT, 15);
            curl_setopt($ch, CURLOPT_POST, true);
            curl_setopt($ch, CURLOPT_POSTFIELDS, $Query);
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
            curl_setopt($ch, CURLOPT_USERAGENT, "TSUE via cURL/PHP");
            $result = curl_exec($ch);
            curl_close($ch);
            if( $result ) 
            {
                $result = preg_split("/\\r\\n|\\r|\\n/", $result);
                if( trim($result["0"]) == "true" ) 
                {
                    $this->status = true;
                }
                else
                {
                    $this->error = trim($result["1"]);
                }

            }

        }

        return $this->status;
    }

}
If you update this file it will not work at all for you as joe as said you need to mod the code given you can try to update the class but it not get you anywhere at all as it will kick you on login still it needs a overhall new code full stop all you can do is swith it off in tools till there is a full fix for this im working on now code for this as it is noone will get it to work ....as joe as said need new
Reply With Quote
The Following User Says Thank You to bigjohn For This Useful Post:
papad (17th June 2018)