[ storne @ 24.04.2009. 16:09 ] @
Imam guestbook na sajtu,funkcionise preko perl-a. Mozete pogledati ovde http://www.kostajnik.com/diskusija.html
Problem je sledeci:
Pojavili su se spameri pa sam resio da ubacim CAPTCHA. Registrovao sam se na protectwebform gde sam sve podesio i gde sam dobio kodove koje treba da iskopiram u *.pl fajl i *.html! Kada to uradim javlja mi se problem pri slanju poruke da nisam popunio obavezna polja, a sva polja iz forme su ispravno popunjena!

Kodovi koje sam dobio su:


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.

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/veri...80&vp=t5nqrjsxvgzw&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
####################################################


1. Editing html file

1. Open the html file containing the form you want to protect in a simple text editor.
2. Copy the code shown below ('Html code')
3. past it between tags:
<form ...> {past your code here}</form> in opened file.

Code:
<a href="http://www.protectwebform.com/" title="Captcha service - protectwebform.com!"><img src="http://www.protectwebform.com/images/ssl_lock.gif" border="0"></a> Enter the code shown in the image:<br /><input type="text" style="vertical-align:top;"  name="protectwebformcode" value=""> <img src="http://protectwebform.com/image/30980/">