\n";
}
/**
* Generate hidden tag (must be in a form)
*
* @return input hidden tag
*/
function generateHiddenTags()
{
return "";
}
/**
* Generate input tag (must be in a form)
*
* @return input tag
*/
function generateInputTags()
{
return "";
}
/**
* Check if user input is correct
*
* @return boolean (true=correct, false=incorrect)
*/
function checkCaptcha()
{
if( isset($_POST['ptitcaptcha_entry']) &&
$_POST['ptitcaptcha_entry'] == PtitCaptchaHelper::_getDisplayText($_POST['ptitcaptcha_key']))
{
return true;
}
return false;
}
/**
* Internal function
*
* @param string $pck
* @return string
*/
function _getDisplayText($pck) // internal function
{
$src=md5(PTITCAPTCHA_ENTROPY.$pck);
$txt="";
for($i=0;$i