D
D
Dusk092015-06-24 23:33:52
Joomla
Dusk09, 2015-06-24 23:33:52

How to make a captcha that appears once an hour ?? Bind by IP?

Hello! There is a Freebitco.in site where a button is available to registered users, after clicking which you need to enter a captcha and get the result ... binding by IP..., the button becomes available again... Tell me how to do the same?? Site on Joomla. Thank you all very much.4c33b6bf15f54624bd9725b81b3cd539.jpg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Kumanin, 2015-06-25
@jackkum

Create a field with a new type and inherit from JFormRuleCaptcha and override the getInput() method

$user = JFactory::getUser();

$time = $user->getParam('timeShowCaptcha', 0);

if((time() - $time) < 3600){
  return '';
}

$user->setParam('timeShowCaptcha', time());
$user->save();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question