Inser recaptcha php code into an existing complex php file

Dokončeno Zveřejněno před 5 lety K zaplacení v momentě doručení
Dokončeno K zaplacení v momentě doručení

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>';

}

?>

PHP

Identifikační číslo projektu: #17247610

O projektu

22 nabídek Projekt na dálku Aktivní před 5 lety

Uděleno uživateli:

NickolaS

Hi there, I can install recaptcha for you right now. Just contact me by chat and we will discuss everything. THanks

€30 EUR za 0 dní
(376 recenzí)
7.6

22 Freelnceři na tento projekt zveřejňují nabídky v průměru €27

Sonicoders

I have four years experience as a web developer will integrate captcha code quickly, inbox me we can discuss more over chat.

€34 EUR za 0 dní
(133 Recenzí)
6.1
nixtech

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

€26 EUR za 0 dní
(126 Recenzí)
6.1
nrtechweb

Hi greetings for the day! I am a senior php and WordPress developer and i have 7 years of experience in web development. I am a individual developer and i am not a company and doing freelancing individually. I will Další

€34 EUR za 1 den
(91 Recenzí)
5.8
milliard

Hi Alexandru, I will help you with this. Please let me know when you want me to deliver? Thanks, Rajesh :-)

€30 EUR za 1 den
(24 Recenzí)
6.0
schoudhary1553

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 Další

€70 EUR za 1 den
(38 Recenzí)
5.8
jhon312020

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 Další

€16 EUR za 1 den
(39 Recenzí)
5.2
sitwebsolution

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 Další

€26 EUR za 1 den
(27 Recenzí)
5.0
shanymathew

Dear Sir I have great experience in integration of google recaptcha Please reply I can do this work perfectly Am waiting for your reply

€30 EUR za 1 den
(43 Recenzí)
4.6
tjcg

Hello Sir, We can successfully build websites in any frameworks of PHP, fulfilling all the requirements. We have read your job post and fully understood the requirements of the project. We believe in quality wo Další

€23 EUR za 1 den
(1 recenze)
2.6
Pdeveloper44

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 Další

€15 EUR za 1 den
(10 Recenzí)
2.6
theweeky15

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 Další

€23 EUR za 1 den
(1 recenze)
0.5
GewoonDani

I'm a full time PHP/Javascript developer so this should be a fairly easy job, will be completed in less than a day.

€14 EUR za 1 den
(0 Recenzí)
0.0