\n";
}
/**
* Generate hidden tag (must be in a form)
*
* @return input hidden tag
*/
static function generateHiddenTags()
{
return "";
}
/**
* Generate input tag (must be in a form)
*
* @return input tag
*/
static function generateInputTags()
{
return "";
}
/**
* Check if user input is correct
*
* @return boolean (true=correct, false=incorrect)
*/
static 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
*/
static function _getDisplayText($pck) // internal function
{
$src=md5(PTITCAPTCHA_ENTROPY.$pck);
$txt="";
for($i=0;$i