Revisions for "Integration Google reCAPTCHA"

Integration Google reCAPTCHA

I have created reCAPTCHA API keys and I have Site key and Secret key.

I have made step 1: Client-side integration.

I need help with step 2: Server-side integration.

Server side should be integrated into the existing PHP code.
If someone does not confirm reCAPTCHA, warning must appear under reCAPTCHA div as like other fields. Form validation rules and message should be integrated into existing Javascript.

Testing link: http://www.copy-electronic.hr/recaptcha

Javascript /FORM/ validation: http://www.copy-electronic.hr/style/js/a/scripts.v1.0.4.js

PHP:

if( isset($_POST['name']) )
{
$to = 'web.prodaja@copy-electronic.hr';
$subject = 'Web upit - Copy Electronic';
$headers = 'From: ' . $_POST['email'] . "\r\n" . 'Reply-To: ' . $_POST['email'];
$message = 'Ime: ' . $_POST['name'] . "\n" .
                    'E-pošta: ' . $_POST['email'] . "\n" .
                    'Naslov: ' . $_POST['subject'] . "\n" .
                    'Poruka: ' . $_POST['message'];
mail($to, $subject, $message, $headers);    
    if( $_POST['copy'] == 'on' )
    {
        mail($_POST['email'], $subject, $message, $headers);
    }
}
Integration Google reCAPTCHA
I have created reCAPTCHA API keys and I have Site key and Secret key. I have made step 1: Client-side integration. I need help with step 2: Server-side integration. Server side should be integrated into the existing PHP code. If someone does not confirm reCAPTCHA, warning must appear under reCAPTCHA div as like other fields. Form validation rules and message should be integrated into existing Javascript. Testing link: http://www.copy-electronic.hr/recaptcha Javascript /FORM/ validation: http://www.copy-electronic.hr/style/js/a/scripts.v1.0.4.js PHP: if( isset($_POST['name']) ) { $to = 'web.prodaja@copy-electronic.hr'; $subject = 'Web upit - Copy Electronic'; $headers = 'From: ' . $_POST['email'] . "\r\n" . 'Reply-To: ' . $_POST['email']; $message = 'Ime: ' . $_POST['name'] . "\n" . 'E-pošta: ' . $_POST['email'] . "\n" . 'Naslov: ' . $_POST['subject'] . "\n" . 'Poruka: ' . $_POST['message']; mail($to, $subject, $message, $headers); if( $_POST['copy'] == 'on' ) { mail($_POST['email'], $subject, $message, $headers); } }
Back to question