How to add a Captcha on a HTML Contact Form

Php

Video is ready, Click Here to View ×


This video provides php code to add captcha code to your HTML form.
Here is the link to the PHP Sorry everyone.
https://drive.google.com/folderview?id=0Bztd5a1hsBvDbk1Va0x2elVzT3c&usp=sharing

9 thoughts on “How to add a Captcha on a HTML Contact Form

  1. i've done the typing but it doesn't work…anyone knows if i screw up the code somewhere?

    <?php
    session_start();

    function random($lenght) {
    $chars "abcdefghijklmnñopqrstuvwxyz123456789";
    $str ="";
    $size strlen ($chars);
    for  (s1=0; $i<$lenght;$i++){
    $str . $chars[rand(0. $size-1))]:
    }
    return $str:
    }

    $cap = random (7);
    $_SESSION{'real'] $cap;

    $image imagereat (100, 20);
    $background = imagecolorallocate ($image, 0,0,0);
    $foreground   imagecolorallocate ($image. 255.255.255):

    imagestring($image, 5,5,1$cap,$foreground);
    header("Content-type: image/jpeg"):
    imagejpeg($image;)

    ?>

Leave a Reply

Your email address will not be published. Required fields are marked *