chameleon-system/pkgcmscaptcha
Mit dem Captcha Modul werden Formulare auf oeffentlich zugaenglichen Websites abgesichert, um missbraeuchlicher Verwendung von Kommentarfunktionen oder Kontaktgeldern entgegenzuwirken.
6.1.2
2017-02-02 14:32 UTC
Requires
- chameleon-system/core: ~6.1.0
README
Usage
- to show a captcha:
<img src="<?=TdbPkgCmsCaptcha::GetInstanceFromName('standard')->GetRequestURL('test')?>" alt="" id="testCaptcha" />
<input type="text" name="mycapture" value="" />
- to check the captcha:
<?php
if (TdbPkgCmsCaptcha::GetInstanceFromName('standard')->CodeIsValid('test', TGlobal::instance()->GetUserData('mycapture'))) {
// all good
} else {
// fail
}
- if you want to include a "generate new" button:
<a href="#" onclick="document.getElementById('testCaptcha').src='<?=TdbPkgCmsCaptcha::GetInstanceFromName('standard')->GetRequestURL('test')?>&'+ Math.random(); return false;" >reload</a>