Inser recaptcha php code into an existing complex php file

Completato Pubblicato 5 anni fa Pagato alla consegna
Completato 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>';

}

?>

PHP

Rif. progetto: #17247610

Info sul progetto

22 proposte Progetto a distanza Attivo 5 anni fa

Assegnato a:

NickolaS

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

€30 EUR in 0 giorni
(376 valutazioni)
7.6

22 freelance hanno fatto un'offerta media di €27 per questo lavoro

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 in 0 giorni
(133 valutazioni)
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 in 0 giorni
(126 valutazioni)
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 Altro

€34 EUR in 1 giorno
(91 valutazioni)
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 in 1 giorno
(24 valutazioni)
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 Altro

€70 EUR in 1 giorno
(38 valutazioni)
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 Altro

€16 EUR in 1 giorno
(39 valutazioni)
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 Altro

€26 EUR in 1 giorno
(27 valutazioni)
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 in 1 giorno
(43 valutazioni)
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 Altro

€23 EUR in 1 giorno
(1 Recensione)
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 Altro

€15 EUR in 1 giorno
(10 valutazioni)
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 Altro

€23 EUR in 1 giorno
(1 Recensione)
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 in 1 giorno
(0 valutazioni)
0.0