PHP 

Simple CAPTCHA for your site !!

0
Here is the Simple Captcha Script for your site, Add it your Site and Prevent Spam !!

It is numerical Captcha :

Code:
<?php
// www.Vidyarthiplus.com
session_start();
if(empty($_POST)) {
$num1 = rand(0,9);
$num2 = rand(0,9);
$num3 = rand(0,9);
$num4 = rand(0,9);
$num = "$num1$num2$num3$num4";
$_SESSION['num'] = $num;
echo $_SESSION['num'];
echo '<form action="a.php?num" method="post">
<input type="text" name="code"><input type="submit" value="Submit"></form>';
} elseif(isset($_GET['num'])) {
$code = $_SESSION['num'];
$num = $_POST['code'];
if($code == $num) {
echo 'Code Typed Correctly !!';
} else {
echo 'Code Wrong - Try Again !!';}}
?>
New&nbsp;Share your Study Materials with us :&nbsp;Click Here

    Simple CAPTCHA for your site !!