Spamming is a huge problem on the internet, spamming mostly originates from badly coded email forms on websites which exploit bugs in the PHP mail function or badly coded email functions in other languages. This is known as email form hijacking.

There are two main problems.#

  • Email code problems: Spammers can add thousands of email recipient addresses to a single to field on an email form.
  • Robot email hijack problem: Spammers can use robots to repetitively hit an email form over and over again.

In both instances they can manipulate the email body and subject using the fields on the form.

We must ensure ALL our customers have coded their forms in a proper fashion to stop both the above.

Email code problems#

Ensure that no line breaks or commas are passed into the to address of the email form. The commas should be stripped out using server side code. This prevents spammers adding thousands of email addresses to a single to address on an email form.

Robot email hijack problem:#

Add a capatcha script to ALL email forms. This script generates images (known as "Captcha's") which contain security codes used for protecting a form from spam bots.

If you are using ASP - please download the free script "asp captcha.zip" below#

1. Unzip all the files keeping the directory structure intact.

2. Files must be run through an ASP enabled web server or on ASP enabled web space. (check with 
your hosting company).

3. Point your web browser to the example file 'example.asp' to check that it runs correctly
on the server you have installed the software on.

Integration of Web Wiz CAPTCHA
===========================================================================================

Hopefully you should find the software easy to integrate.

The files 'example.asp' and 'example_process_form.asp' are only used as an example of
how Web Wiz CAPTCHA works.


1. Place the folder, and it's contents, named 'CAPTCHA' into the same directory that your 
web form you wish to integrate Web Wiz CAPTCHA into is in.


2. The web page that contains the HTML web form you wish to integrate Web Wiz CAPTCHA into must
have an .asp extension (eg. my_own_form_file.asp (this is an example file name and not a real
file))


3. Open your web form in a text editor and place the following code into the part of your
form where you wish the CAPTCHA image and textarea to be:-

	<!-- include the Web Wiz CAPTCHA form -->
	<!--#include file="CAPTCHA/CAPTCHA_form_inc.asp" -->

	
4. Open the file in a text editor that is to process your web form input, and place the 
following code at the top of the file:-

	<!-- Include file for CAPTCHA form processing -->             
	<!-- #include file="CAPTCHA/CAPTCHA_process_form.asp" -->

	
5. Now within the file you entered the code from the last step into you can call the following 
variable to check that the CAPTCHA code entered is correct.

	blnCAPTCHAcodeCorrect
	
If the CAPTCHA code entered is correct the above variable with be set to true, if the CAPTCHA code
has not been entered correctly the variable will be set to false. 


	5.1 Below is some sample code to check the CAPTCHA code is correct:-
	
		If blnCAPTCHAcodeCorrect = True Then
			Response.Write(" CAPTCHA code is correct")
		ElseIf  blnCAPTCHAcodeCorrect = False Then
			Response.Write(" CAPTCHA code is NOT correct")
		End If



That should be it, hopefully now you have successfully integrated  Web Wiz CAPTCHA into your 
web form.


Customising Web Wiz CAPTCHA
===========================================================================================

1. The only customisation that can be done to this software is to make it NOT case sensitive
by editing the file 'CAPTCHA/CAPTCHA_setup.asp' and altering the following variable:-

	blnCAPTCHAcaseSensitive = true


Removing Links Back to Web Wiz Guide
===========================================================================================

Many 1000's of unpaid hours have gone into developing this and the other applications 
available for free from Web Wiz Guide.

If you like using this application then please help support the development and update of 
this and future applications.

If you would like to remove the powered by logo from the application then you must purchase 
a link removal license key from Web Wiz Guide.


Payments can be made securely on-line using your credit or debit card through WorldPay or 
PayPall more information on this can be found at: -

	http://www.webwizguide.info/purchase

===========================================================================================
If you are using PHP - please download the free script "php captcha.zip" below
Place the following code on your form. This will generate an image with a random string of 
characters along with the text field where the user will retype the code.

<img src="CaptchaSecurityImages.php" />
Security Code: 
<input id="security_code" name="security_code" type="text" />

You can also specify certain options for the image by passing them as variables to 
CaptchaSecurityImages.php. The options available are the width and height of the image 
and the number of characters

<img src="CaptchaSecurityImages.php?width=100&height=40&characters=5" alt="captcha" />
<input id="security_code" name="security_code" type="text" />

Place the following in the code where the form is submitted to. This code will check 
what the user has typed matches the code in the image.

<?php 
   session_start();
   if(($_SESSION['security_code'] == $_POST['security_code']) && (!empty($_SESSION['security_code'])) ) {
      // Insert you code for processing the form here, e.g emailing the submission, entering it into a database. 
      unset($_SESSION['security_code']);
   } else {
      // Insert your code for showing an error message here
   }
?>

If you would rather your <img> tag links to a jpg rather than a php file you can use mod_rewrite. By inserting the following in your .htaccess file you can use <img src="captcha.jpg" /> instead.

RewriteEngine on
RewriteRule captcha.jpg /CaptchaSecurityImages.php

You may wish to change the colour of the captcha image, this can be done by editing the background_colour, text_colour and noise_colour variables. The imagecolorallocate() function constucts a colour from the given RGB (red, green and blue) values, each of these is a number between 0-255. Another idea you might want to try is using the mt_rand function to randomize the colour each time a captcha is generated.

Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
zip
php captcha.zip 26.1 kB 1 24-May-2017 15:30 Hyve Support
zip
web_wiz_CAPTCHA_v4.0.zip 148.7 kB 1 24-May-2017 15:30 Hyve Support
« This page (revision-1) was last changed on 24-May-2017 15:30 by UnknownAuthor
G’day (anonymous guest) My Prefs
  • View Page Source
  • This clear IPSec security association,
    clear ipsec sa peer X.X.X.X
    

All Pages

Page views: 1741

Private Tomcat

Linux

MySQL

Email

SQL Server

ASP

JSP

C#

Web Mail

Windows Plesk

Linux Plesk

PHP

Gaming

ASP.NET

Persits ASPUpload

Wiki Help

Referring Pages:
...nobody

JSPWiki v2.8.1