PHP Classes

FCaptcha: Verify if the user is a human with a CAPTCHA image

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 76 All time: 10,177 This week: 57Up
Version License PHP version Categories
fcaptcha 1.0Custom (specified...5PHP 5, Graphics, Validation
Description 

Author

This package can verify if the user is a human with a CAPTCHA image.

It can generate an image that displays a text string generated randomly.

The generated text is stored in a session variable.

The package also verifies if the text entered by a user matches what is displayed in the image by checking the session variable.

Picture of Faris AL-Otabi
  Performance   Level  
Innovation award
Innovation award
Nominee: 5x

Winner: 1x

 

Example

<?php
session_start
();

include_once
'./src/FCaptcha.php';

$c = new FCaptcha;

if (
$_SERVER['REQUEST_METHOD'] == 'POST') {
    echo
$c->checkCaptch($_POST['captcha']) ? 'Captcha OK' : 'Captcha Bad';
}
?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <form action="" method="post">
        <div>
            <img src="captcha.php" alt="">
        </div>
        <div>
            <input type="text" name="captcha" id="">
        </div>
        <div>
            <button type="submit">Check</button>
        </div>
    </form>



</body>

</html>


Details

FCaptcha

Simple PHP Captcha Library

![](https://i.imgur.com/5HDJhtE.png)

License

MIT


  Files folder image Files (5)  
File Role Description
Files folder imagesrc (1 file)
Accessible without login Plain text file captcha.php Example Example script
Accessible without login Plain text file index.php Example Example script
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Documentation

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:76
This week:0
All time:10,177
This week:57Up