AJAX
  Home arrow AJAX arrow Page 3 - Using Division Equations to Make Web Forms Safer with Ajax
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Forums Sitemap 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
AJAX

Using Division Equations to Make Web Forms Safer with Ajax
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 2
    2009-04-08


    Table of Contents:
  • Using Division Equations to Make Web Forms Safer with Ajax
  • Review: challenging users with multiplication
  • Using division equations as challenge strings
  • Completing the Ajax-based web form protection mechanism

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Using Division Equations to Make Web Forms Safer with Ajax - Using division equations as challenge strings
    (Page 3 of 4 )

    In order to modify the Ajax application shown in the previous segment, and make it capable of generating division equations within a specific web form, I’m going to redefine one of its source files -- specifically, the one called “get_checkingcode.php.” Once modified, this file will be charged with generating the proper division equations, in this way implementing a simple protection system.

    That being said, here’s the brand new definition of this PHP file. Have a look at it, please:


    <?php

    session_start();

    $valuea=rand(1,10)*2;

    $_SESSION['checkcode']=$valuea/2;

    echo $valuea.' % 2';

    ?>


    Indeed, the above file is extremely easy to follow. It simply generates challenge division equations, where the dividend will always be a random pair of integers. In this case, I decided to divide this number by 2, in order to construct simple operations, but naturally this option can be modified to fit other requirements.

    So far, so good. Having modified the signature of the “get_checkingcode.php” PHP file, the Ajax program that you saw before now has the capacity to generate division equations in the form of challenge strings. Thus, provided that you've grasped how this file functions, it’s time to see how it can be directly coupled to an HTML form to turn this protection mechanism into a fully-functional application.

    Therefore, go ahead and read the next section. It’s only one click away.



     
     
    >>> More AJAX Articles          >>> More By Alejandro Gervasio
     

       

    AJAX ARTICLES

    - PHP AJAX Form Validation
    - Completing a User-Defined CSS Website with P...
    - Create a User-Defined CSS Website with PHP
    - Build A Better Twitter Chat Client Than Cham...
    - Using Division Equations to Make Web Forms S...
    - Using Integer Multiplication to Protect Web ...
    - Using Simple Checksums for Web Form Verifica...
    - Protecting Web Forms with AJAX
    - Using Prototip with AJAX
    - Using Prototip
    - Using the google.load() Method with Google`s...
    - How to Handle Ajax Errors
    - Uncompressing Source Files with Google`s AJA...
    - Using the jQuery Framework with Google`s Aja...
    - Using Google`s Ajax Libraries API


     



    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 9 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek