coWiki 0.3.4
Current user:   guest   Change Preferences
   List directory   Similar   Print version 
Diff: Components
 Legend:   Removed   Changed   Added 
 Ownership:  rw-rw-r-- iezzip users
 Modified:  05 Jan 06, 00:22
 Modified by:  Philip Iezzi (iezzip)
Rev.:  5 (Old)
 
 Ownership:  rw-rw-r-- iezzip users
 Modified:  12 Mar 06, 15:07
 Modified by:  Philip Iezzi (iezzip)
Rev.:  6 (Current)


+ %TITLE%

+ %TITLE%

There will be a short description of each package of Sourdough. This page is not intended to provide you with a full-featured documentation of all components. If any samples provided do not work with your existing Sourdough install, please grab the most recent version from ((Download|Development)(CVS)).
There will be a short description of each package of Sourdough. This page is not intended to provide you with a full-featured documentation of all components. If any samples provided do not work with your existing Sourdough install, please grab the most recent version from ((Download|Development)(SVN)).

For a detailed class reference, check the ((http://sourdough.phpee.com/api/)(API documentation)).

<toc>

---

<q>
++ Captcha - anti-flood image verification



<table border="1">
| package: | image
| location: | Sd_Image/
| classes: | *Sd_Captcha*
| example: | examples/Sd_Image/example2/
</table>


A ((http://en.wikipedia.org/wiki/Captcha)(Captcha)) (an acronym for "completely automated public Turing test to tell computers and humans apart") is a type of challenge-response test used in computing to determine whether or not the user is human. This class is used to generate a captcha image for usage as anti-flood protection in webforms.

To get a Captcha-object, simply call:

<code>
$Sourd = new Sourdough();
$Sourd->Captcha();
</code>

For a working user verification sample we are going to create the following 3 files:


* *index.php* - user verification form
* *image.php* - Captcha image generator, embedded as image in index.php
* *process.php* - Process user input and verify it


index.php:

<code>
<form method="POST" action="process.php" enctype="multipart/form-data">
<table cellpadding="3" cellspacing="1">
<tr><td><img src="image.php"></td></tr>
<tr><td><input type="text" name="captcha"></td></tr>
<tr><td><input type="submit" value="Enter" ></td></tr>
</table>
</form>
</code>

image.php:

<code>
// create main Sourdough object
include_once('Sourdough.class.php');
$Sourd = new Sourdough();

// get Captcha object and return the image
$captcha = $Sourd->Captcha();
$captcha->out();
</code>

process.php:

<code>
include_once('Sourdough.class.php');
$Sourd = new Sourdough();
$captcha = $Sourd->Captcha();

if($captcha->isValid()) {
echo "SUCCESSFULLY !";
} else {
echo "WRONG INPUT !!!";
}
</code>

There's nothing more to do. It's really that easy. For a detailed working sample please check the code in */examples/Sd_Image/example2* or run directly by clicking on the following link: ((http://www.phpee.com/sourdough/examples/Sd_Image/example2)(example2)).

By using the *new Captcha image generation* with ((http://www.imagemagick.org/)(ImageMagick)), it makes life of spambots quite a bit harder. Check the sample code in ((http://www.phpee.com/sourdough/examples/Sd_Image/example3)(example3)).
</q>
For a detailed class reference, check the ((http://sourdough.phpee.com/api/)(API documentation)).

<toc>

---

<q>
++ Captcha - anti-flood image verification



<table border="1">
| package: | image
| location: | Sd_Image/
| classes: | *Sd_Captcha*
| example: | examples/Sd_Image/example2/
</table>


A ((http://en.wikipedia.org/wiki/Captcha)(Captcha)) (an acronym for "completely automated public Turing test to tell computers and humans apart") is a type of challenge-response test used in computing to determine whether or not the user is human. This class is used to generate a captcha image for usage as anti-flood protection in webforms.

To get a Captcha-object, simply call:

<code>
$Sourd = new Sourdough();
$Sourd->Captcha();
</code>

For a working user verification sample we are going to create the following 3 files:


* *index.php* - user verification form
* *image.php* - Captcha image generator, embedded as image in index.php
* *process.php* - Process user input and verify it


index.php:

<code>
<form method="POST" action="process.php" enctype="multipart/form-data">
<table cellpadding="3" cellspacing="1">
<tr><td><img src="image.php"></td></tr>
<tr><td><input type="text" name="captcha"></td></tr>
<tr><td><input type="submit" value="Enter" ></td></tr>
</table>
</form>
</code>

image.php:

<code>
// create main Sourdough object
include_once('Sourdough.class.php');
$Sourd = new Sourdough();

// get Captcha object and return the image
$captcha = $Sourd->Captcha();
$captcha->out();
</code>

process.php:

<code>
include_once('Sourdough.class.php');
$Sourd = new Sourdough();
$captcha = $Sourd->Captcha();

if($captcha->isValid()) {
echo "SUCCESSFULLY !";
} else {
echo "WRONG INPUT !!!";
}
</code>

There's nothing more to do. It's really that easy. For a detailed working sample please check the code in */examples/Sd_Image/example2* or run directly by clicking on the following link: ((http://www.phpee.com/sourdough/examples/Sd_Image/example2)(example2)).

By using the *new Captcha image generation* with ((http://www.imagemagick.org/)(ImageMagick)), it makes life of spambots quite a bit harder. Check the sample code in ((http://www.phpee.com/sourdough/examples/Sd_Image/example3)(example3)).
</q>


Home | Documentation | Download | RSS 1.0 | GEO URL

Driven by coWiki 0.3.4 (Boron) web collaboration tool.