PHP Classes

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Classes of Chris Hepner  >  Friendly CAPTCHA  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example implementation
Class: Friendly CAPTCHA
CAPTCHA validation using text with math expression
Author: By
Last change:
Date: 6 years ago
Size: 1,045 bytes


Class file image Download


$testcaptcha = new mathCaptcha();

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="">
<title>CAPTCHA Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

//Generate hidden CSS


<form action="example_submit.php" method="post">

    <fieldset id="contactinfo">
    <legend>Verify you are human</legend>

    <label for="math_captcha"><?php $testcaptcha->printProblem(); ?></label>
    <input name="math_captcha" id="math_captcha" type="text" class="textinput" />
    <input name="submit" value="Submit" type="submit" />

//Generate optional Javascript for improved accessibility