<?php
//
//example for OspamNo
//
require ('OspamNo.php');
$OspamNo = new OspamNo('en'); // en or ar
switch ($_GET['go'])
{
default:
case 1:
echo '
<form action="?go=2" method="post">
Answer to pass:<br/>
' . $OspamNo->show() . ' <br/>
<input type="text" name="answer" size="10" /> <br/>
<input type="submit" value="go" />
</form>';
break;
case 2:
if (empty($_POST['answer']))
{
echo "answer is an empty !!";
exit();
}
if ($OspamNo->result($_POST['answer']))
{
echo "Good answer :)";
}
else
{
echo "Bad answer !!! :(";
}
break;
}
?>
|