WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDESPHP CLASSESCODE SEARCHARTICLES SEARCHPHP FORUMSPHP MANUALPHP FUNCTIONS LISTWEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Join us on FaceBook
Submit a code Example / Snippet Submit Your Code
Poker Tournaments Poker Tournaments
Poker Guide for Developers Poker Guide for Developers
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Resources
Web Development Content
Internet Security Software
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
פרייסז - הכח לקנות עובר לידיים שלך
Texas Holdem Poker Evangelists

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : Dynamic Image Authentication System in Signup Pages (CAPTCHA)
Categories : PHP, Security, GD image library Click here to Update Your Picture
Hasin Hayder
Date : Jan 29th 2005
Grade : 3 of 5 (graded 11 times)
Viewed : 13556
File : 4067.zip
Images : No Images for this code example.
Search : More code by Hasin Hayder
Action : Grade This Code Example
Tools : My Examples List

Submit your own code examples  Submit your own code examples 
 

Hi,
This example shows you how to add dynamic image security system in signup pages like yahoo, hotmail etc. It will make your webpages more secured.

See the attached zip file and run login.php

dynamicimage.php
<?php
$data
= base64_decode($HTTP_GET_VARS['dt']);
$im = imagecreate(65,20);
$white = imagecolorallocate($im,255,255,255);
$gray = imagecolorallocate($im, 210,210,210);
$black = imagecolorallocate($im, 0,0,0);
imagestring($im,4,8,2,$data,$black);
imageline($im,0,10,65,10,$gray);
imagepng($im);
?>



login.php
<! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Dynamic Image Creation</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
This script shows how to implement a strong authentication scheme using dynamically generated image. This small snippet is extremely helpful for creating your signup script.
<form name="form1" method="post" action="">
  <table width="42%"  border="0" align="center" cellpadding="1" cellspacing="0" bgcolor="#990000">
    <tr>
      <td><table width="100%"  border="0" align="center" cellpadding="2" cellspacing="2" bgcolor="#FFFFFF">
        <tr>
          <td width="64%">Type the following Image Data : <br>
            <input name="data" type="text" id="data3"></td>
          </tr>
        <?
global $data;
$data = mt_rand(100000,1000000);
       
?>
        <tr>
<td>Image : <br>
<img src=dynamicImage.php?dt=<? global $data; echo base64_encode($data);?> border="1">
            <input type=hidden name='md5' value =<? echo md5($data);?>></td>
          </tr>
        <tr>
          <td> </td>
          </tr>
        <tr>
          <td><input type="submit" name="Submit" value="Submit"></td>
          </tr>
        <tr>
          <td>Result : <b>
            <?
if (count($HTTP_POST_VARS)>0)
{
        if (
md5($HTTP_POST_VARS['data']) == $HTTP_POST_VARS['md5'])
        {
            echo
"Its Alright";
        }
        else
        {
            echo
"Wrong";
        }
}
?>
            <br>
          </b></td>
          </tr>
      </table></td>
    </tr>
  </table>
</form>
</body>
</html>



A damaged image generator (class) for validating text. CAPTCHA - Completely Automated Public Turing test to tell Computers and Humans Apart
Categories : PHP, PHP Classes, Security, GD image library, Security
Securing Web Forms with Simple PHP-CAPTCHA (Completely Automated Public Turing test to tell Computers and Humans Apart)
Categories : PHP, Security, GD image library, Sessions
Generate image with random number (CAPTCHA)
Categories : PHP, GD image library, Graphics, Security
Creates a CAPTCHA image in PHP, which displays 5 numbers stored in a session.
Categories : PHP, GD image library, Form Processing, Security
Function to generate readable/remeberable random password
Categories : PHP, Security, Security
A captcha image allows you to prevent spam posting when users reload the page and stop bots from submitting forms automatically. This version allows you to use your own fonts (.ttf) to show the text.
Categories : PHP, Security, Graphics, GD image library
CAPTCHA[Image verification]
Categories : PHP, Security, GD image library, Graphics, Sessions
imageMarker v 3.00 with new advanced features
Categories : PHP, PHP Classes, Graphics, GD image library
addslashes automatically to $_POST variables
Categories : PHP, Form Processing, Security
Convert PNG, JPEG and GIF images to ASCII
Categories : PHP, ASCII, GD image library
Session Validation Methods (Security Checks)
Categories : PHP, Sessions, Security
Secure Login
Categories : PHP, MySQL, Cookies, Security
Passgen: Automatically generate mixed case alpha numeric passwords
Categories : PHP, Security
IP Blocking
Categories : PHP, Security, HTTP
Anti SQL injection-PHP
Categories : PHP, MySQL, Security