Sign in:
Username:
Password:  
»Forgot your password?

Home | Forum | How to Protect Your Web Form | How to Protect Your Email | Sign Up

Insure yourself from spam! The Anti Spam Insurance Company - ProtectWebForm!

Forum - Perl Form Mail

PostMessage
maggiehill
2008-03-20 05:46:23
Hi
I wondered if any one could help. I have successfully used the image
captcha by adding it the simple way which puts the code on the next
page following pressing the submit button but ideally I wish to have
in included in my form.
I have tried to follow the instructions without any success.

The script it says I should add is as follows :-

Editing perl (.pl or .cgi) file
If you have perl powered script wich processes your web form, use this
code.

1. Open the perl file which processes your form (How do i find the
file that processes the form?).
2. Copy the code shown below ('Perl code:')
3. Past it after the line '#!perl' or '#!/usr/bin/perl' in the
beginning of your file.

Perl code:

###################################################
# Code provided by http://www.protectwebform.com
use LWP::Simple; use CGI; use URI::Escape;
CGI::ReadParse();
my $pwf_message = "The image code you have provided does not match the
actual one. Hit the 'back' button of your browser and input the
correct code please.";

if(length($in{'protectwebformcode'}) > 30) {
print "Content-type: text/html\n\n".$pwf_message;
die;
}

my $protectwebformresult =
get("http://protectwebform.com/verify01?vui=19008&vp=tq1hsv74gcmb&ri="
. uri_escape($ENV{'REMOTE_ADDR'}) . "&vs=" .
uri_escape($in{'protectwebformcode'}));

if($protectwebformresult =~ m/<authorization status="0"/) {
print "Content-type: text/html\n\nWarning. You are not authorithed
to use image protection provided by http://www.protectwebform.com.
Read http://www.protectwebform.com FAQ for more information";
}
if($protectwebformresult !~ m/<verification result="yes"/) {
print "Content-type: text/html\n\n".$pwf_message;
die;
}
# End of code provided by http://www.protectwebform.com
####################################################
I have it on my html page not problem but I have added the above text
to my perl form and it will not post it (send it).
My Perl form is as follows

#!/usr/bin/perl -wT
#
# NMS FormMail Version 3.14c1
#

use strict;
use vars qw(
$DEBUGGING $emulate_matts_code $secure %more_config
$allow_empty_ref $max_recipients $mailprog @referers
@allow_mail_to @recipients %recipient_alias
@valid_ENV $date_fmt $style $send_confirmation_mail
$confirmation_text $locale $charset $no_content
$double_spacing $wrap_text $wrap_style $postmaster
$address_style
);

# PROGRAM INFORMATION
# -------------------
# FormMail.pl Version 3.14c1
#
# This program is licensed in the same way as Perl
# itself. You are free to choose between the GNU Public
# License <http://www.gnu.org/licenses/gpl.html> or
# the Artistic License
# <http://www.perl.com/pub/a/language/misc/Artistic.html>
#
# For help on configuration or installation see the
# README file or the POD documentation at the end of
# this file.

# USER CONFIGURATION SECTION
# --------------------------
# Modify these to your own settings. You might have to
# contact your system administrator if you do not run
# your own web server. If the purpose of these
# parameters seems unclear, please see the README file.
#
BEGIN
{
$DEBUGGING = 1;
$emulate_matts_code= 0;
$secure = 1;
$allow_empty_ref = 1;
$max_recipients = 5;
$mailprog = '/usr/lib/sendmail -oi -t';



I obviously haven't included the total form.

I have tried adding it directly after
#!/usr/bin/perl -wT
I have deleted the wt I have tried adding it after #!/usr/bin/perl
-wT
#
# NMS FormMail Version 3.14c1
# and other variations without success. I must be doing something
silly

my html page includes the line <FORM "/cgi-bin/add_entryvff.pl"
method=post onSubmit="MM_validateForm('Telephone
Number','','R','email','','RisEmail');return
document.MM_returnValue">

add_entryvff.pl being the name of my perl form.

Any ideas ????

Cheers
maggie
maggiehill
2008-03-23 03:24:27
OK
I have sorted this and the form is now working
Don Hamsford
2008-04-14 21:31:28
Any chance of you letting us know what the problem / resolution was?

Thanks,
Don






Post Reply:

You must be logged in to reply.
Post message
Name: 
Email: 
Url: 




Registered users: 19717

Forms protected: 47459

Further Reading & Anti Spam Resources:

Directory
Search our site for:
 
Web www.protectwebform.com

Get Thunderbird!

    ©Copyright 2006 ProtectWebForm.com. All rights reserved. Read our Privacy Policy

Page copy protected against web site content infringement by Copyscape