S
S
Sergey2015-08-18 05:35:49
PHP
Sergey, 2015-08-18 05:35:49

How to check recapthc in PHP server?

I put google recaptcha.
On the client side, everything started. I connected a js script with api, inserted a div with recaptcha inside the form.
Here is what Google writes about the server side:

When users submit a form with built-in reCAPTCHA validation, you get the "g-recaptcha-response" string along with other data. To find out if the user passed the verification, send a POST request with the following parameters:
secret ( key )
response ( Value "g-recaptcha-response" )

If I do var_dump($_POST), then no "g-recaptcha-response" is anywhere near there.
What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
SimBioT19, 2015-08-18
@SimBioT19

Here, everything is detailed
www.9lessons.info/2014/12/google-new-recaptcha-usi...

S
Sergey, 2015-08-18
@frost18

Check that the form submits post data
Open the panel, make sure js has inserted the field

<textarea id="g-recaptcha-response" name="g-recaptcha-response" class="g-recaptcha-response" style="width: 250px; height: 40px; border: 1px solid #c1c1c1; margin: 10px 25px; padding: 0px; resize: none;  display: none; "></textarea>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question