|
#1
|
||||
|
||||
reCAPTCHA for tsue 2.2
any one tried to upgrade from v1 reCAPTCHA to v2 reCAPTCHA in tsue 2.2 as old one is dead by google shutdown
|
#2
|
||||
|
||||
|
#3
|
||||
|
||||
|
#4
|
||||
|
||||
@TraceR
I have tested this option my self, and it works, without problems Test it yourself and come back with resultate Or disable reCaptcha |
#5
|
||||
|
||||
did you update the conformation part?
this wont work for you but it well give you an idea Code:
$ip = $_SERVER['REMOTE_ADDR']; $response=file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=".$recap_private_key."&response=".$recaptcha_response_field."&remoteip=".$ip); $responseKeys = json_decode($response,true); $recap_pass = intval($responseKeys["success"]) !== 1 ? false : true;
__________________
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/ |
#6
|
||||
|
||||
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; } } |
#7
|
|||
|
|||
Quote:
|
The Following User Says Thank You to bigjohn For This Useful Post: | ||
papad (17th June 2018)
|
#8
|
||||
|
||||
|
#9
|
||||
|
||||
then please post your
Code:
class TSUE_captcha getting the First screen to show the confirmation box is fine but with out the part that checks it it is work less.
__________________
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/ |
#10
|
||||
|
||||
Hi Joe,
like I write on this post, temporary solution: http://www.bvlist.com/showpost.php?p=51659&postcount=63 Quote:
Code:
<form id="signupbox_form" action=""> <input type="hidden" name="invite_hash" value="{$invite_hash}" id="invite_hash" /> <input type="hidden" name="a_hash" value="{$a_hash}" id="a_hash" /> <div class="tableHeader"> <div class="row"> <div class="cell first"> {$signup_through_facebook} {$TSUE['TSUE_Language']->phrase['signup_form']} </div> </div> </div> <div class="table"> <div class="row"> <div class="cell"><label for="signupbox_membername">{$TSUE['TSUE_Language']->phrase['your_name']}</label></div> <div class="cell"><label for="signupbox_date_of_birth">{$TSUE['TSUE_Language']->phrase['memberinfo_date_of_birth']}</label></div> </div> <div class="row"> <div class="cell"> <input type="text" name="signupbox_membername" id="signupbox_membername" class="s" accesskey="m" value="{$signupbox_membername}" title="{$TSUE['TSUE_Language']->phrase['membername_tip']}" /> </div> <div class="cell"> <input type="date" name="signupbox_date_of_birth" id="signupbox_date_of_birth" class="s" accesskey="d" value="{$signupbox_date_of_birth}" title="{$TSUE['TSUE_Language']->phrase['memberbday_tip']}" /> </div> </div> <div class="row"> <div class="cell"><label for="signupbox_email">{$TSUE['TSUE_Language']->phrase['your_email']}</label></div> <div class="cell"><label for="signupbox_email2">{$TSUE['TSUE_Language']->phrase['confirm_email']}</label></div> </div> <div class="row"> <div class="cell"> <input type="text" name="signupbox_email" id="signupbox_email" class="s" accesskey="e" value="{$signupbox_email}" title="{$TSUE['TSUE_Language']->phrase['memberemail_tip']}" /> </div> <div class="cell"> <input type="text" name="signupbox_email2" id="signupbox_email2" class="s" accesskey="f" value="" title="{$TSUE['TSUE_Language']->phrase['memberemail2_tip']}" /> </div> </div> <div class="row"> <div class="cell"><label for="signupbox_password">{$TSUE['TSUE_Language']->phrase['your_password']}</label></div> <div class="cell"><label for="signupbox_password2">{$TSUE['TSUE_Language']->phrase['confirm_password']}</label></div> </div> <div class="row"> <div class="cell"> <div class="passwordStrength"> <div class="score"><span><b></b></span></div> <input type="password" name="signupbox_password" id="signupbox_password" class="s" accesskey="p" value="" title="{$TSUE['TSUE_Language']->phrase['memberpassword_tip']}" /> </div> </div> <div class="cell"> <input type="password" name="signupbox_password2" id="signupbox_password2" class="s" accesskey="c" value="" title="{$TSUE['TSUE_Language']->phrase['memberpassword2_tip']}" /> </div> </div> <div class="row"> <div class="cell">{$TSUE['TSUE_Language']->phrase['memberinfo_gender']}</div> <div class="cell"><label for="signupbox_timezone">{$TSUE['TSUE_Language']->phrase['membercp_timezone']}</label></div> </div> <div class="row"> <div class="cell"> <input type="radio" name="signupbox_gender" id="memberinfo_gender_female" value="f"{$genderChecked['f']} /> <label for="memberinfo_gender_female">{$TSUE['TSUE_Language']->phrase['memberinfo_gender_female']}</label> <input type="radio" name="signupbox_gender" id="memberinfo_gender_male" value="m"{$genderChecked['m']} /> <label for="memberinfo_gender_male">{$TSUE['TSUE_Language']->phrase['memberinfo_gender_male']}</label> <input type="radio" name="signupbox_gender" id="memberinfo_gender_unspecified" value=""{$genderChecked['n']} /> <label for="memberinfo_gender_unspecified">{$TSUE['TSUE_Language']->phrase['memberinfo_gender_unspecified']}</label> </div> <div class="cell">{$get_timezones}</div> </div> </div> <div class="tableFooter"> <div class="row"> <div class="cell"> <!-- {$CAPTCHA} --> <div class="g-recaptcha" data-sitekey="YOU_SITE_KEY_HERE"></div> </div> </div> </div> <div class="tableFooter"> <div class="row"> <div class="cell"> <input type="submit" value="{$TSUE['TSUE_Language']->phrase['signup']}" class="submit" /> <input type="reset" value="{$TSUE['TSUE_Language']->phrase['button_clear']}" class="submit" id="signup-buttons" /> </div> </div> </div> </form> |
Tags |
22 , recaptcha , tsue |
|
|