Skip to content

Simple customizable captcha script for bot prevention in php language.

License

Notifications You must be signed in to change notification settings

arsovskidev/php-captcha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

phpCaptcha

Simple customizable captcha script for bot prevention in php language.

Usage
<?php
session_start();
$status = "";

if ($_SESSION['captcha'] === $_POST['captcha']) {
    $status = "<p style='color: green;'>Captcha is correct!</p>";
} else {
    $status = "<p style='color: red;'>Captcha is invalid!</p>";
}
?>
<form method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>">
    <img src="generate.php" alt="CAPTCHA">
    <div class="elem-group">
        <label for="captcha">Enter the captcha:</label>
        <br>
        <input type="text" id="captcha" name="captcha">
        <input type="submit" name="submit" value="Submit">
    </div>
</form>
Feel free to use it for your project.

About

Simple customizable captcha script for bot prevention in php language.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages