I want the form to be submitted at least 15 seconds after the page loads (because this is how long it takes on average to fill out the form).
I know that I can do something like $ time_page_loaded = time () on top;
if (time() < $time_page_loaded + 15) { // show reCaptcha } else { // submit to database }
It is right? Also, when you re-remember this in a function, how would you do it?
, , . () (, / ) .. , , , .
, HAS , , , ( ) - , .
javascript ( ). javascript . "onsubmit" . , , recaptcha .
, , .
- , cookie.
script :
<?php session_start();
, , :
if (time() < $_SESSION["time_page_loaded"] + 15) { // Captcha }
, , <input type="hidden" value="<?php echo time(); ?>" /> ( ) time() . , , .
<input type="hidden" value="<?php echo time(); ?>" />
time()
, , , . , (IE ), - "". jQuery, :
http://www.erichynds.com/jquery/a-new-and-improved-jquery-idle-timeout-plugin/
( PHP), ,
BUT it is not safe. You should use something like javascript to do this
Source: https://habr.com/ru/post/1788693/More articles:I want to ask you how it should look like this code for C ++ - c ++Adding NSControl to IKImageBrowserCell - objective-cJQuery 1.4.4 error "q.replace is not a function" - jqueryhow to create your own rail generator without the need for argumentation? - generatorvideo player on website - javascripthttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1788694/c-mvc-2-pass-multiple-object-types-to-one-controller-action&usg=ALkJrhhHuCucjnXXChdMkA_jkNmw5CNkOAAccess is denied to a folder in one class, but not another - c #It is possible to lock a directory so that only one access to the domain can access it - directoryСкрытие или обфускация пути URL к файлам - phpwith UPnP ports - c ++All Articles