Inser recaptcha php code into an existing complex php file
€8-30 EUR
Pagato alla consegna
Hello,
i am trying to configure recaptcha v2 on my website. I found the code on the internet, i am providing it below. I have done the client side work myself, however on the server side there is a [login to view URL] file done by the developer of a newsletter sending application that needs to include this code i found on the internet so that recaptcha starts to work. I am lacking the skills to integrate it so that all the current code keeps perfect functionality.
It should't be complicated for a coder,
best regards.
Alexandru
<?php
function post_captcha($user_response) {
$fields_string = '';
$fields = array(
'secret' => '6Lfg9V8UAAAAAJQmqjZnXa0AcmC4ISXD3twREuYN',
'response' => $user_response
);
foreach($fields as $key=>$value)
$fields_string .= $key . '=' . $value . '&';
$fields_string = rtrim($fields_string, '&');
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, '
[login to view URL]');
curl_setopt($ch, CURLOPT_POST, count($fields));
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, True);
$result = curl_exec($ch);
curl_close($ch);
return json_decode($result, true);
}
// Call the function post_captcha
$res = post_captcha($_POST['g-recaptcha-response']);
if (!$res['success']) {
// What happens when the CAPTCHA wasn't checked
echo '<p>Please go back and make sure you check the security
CAPTCHA box.</p><br>';
} else {
// If CAPTCHA is successfully completed...
// Paste mail function or whatever else you want to happen here!
echo '<br><p>CAPTCHA was completed successfully!</p><br>';
}
?>
Rif. progetto: #17247610
Info sul progetto
Assegnato a:
Hi there, I can install recaptcha for you right now. Just contact me by chat and we will discuss everything. THanks
22 freelance hanno fatto un'offerta media di €27 per questo lavoro
I have four years experience as a web developer will integrate captcha code quickly, inbox me we can discuss more over chat.
Hello Sir I can make the recapthca workable for you and ready to start right away. Please check my profile for work and experience. Regards Ashwin
Hi Alexandru, I will help you with this. Please let me know when you want me to deliver? Thanks, Rajesh :-)
Hello, I can help with you in your project Inser recaptcha php code into an existing complex php file. I have more than 5 years of experience in PHP. We have worked on several similar projects before! We have wor Altro
Working has a full time freelancer. Have a good profile in freelancer .com Available Timings 11.30 AM to 9.00 PM IST Monday to Friday. Technical Skills - 9+ years of experience in web development - 2+ years of Altro
Dear Sir/Madam, Hello Sir, we already worked on the same project. We are from S IT Solution, we're already skilled and experienced with your Desired skills. If you Consider us Altro
Dear Sir I have great experience in integration of google recaptcha Please reply I can do this work perfectly Am waiting for your reply
Hi, Hope, you’re doing well. absolute professional here, no time waster. I’m very Expert Web Developer/Software Developer, I have read the Project Description, I can help you. I have done this kind of Project Altro
Hello Boss, Am ready to start now and as per your requirement I am well deserving candidate for your project. I have read your JD and can I express my interest for the same because it’s a good fit for what I’ve been Altro
I'm a full time PHP/Javascript developer so this should be a fairly easy job, will be completed in less than a day.