USANet Creations
Users Support and Discussion Areas

NOTE: Always state the software package you have
when asking questions so you will get the correct answer,
as it does make a big difference in the answers you'll get!

| Main Site Home Page | Forums Home Page |

Subject: "Check to see if you are human at New User Registration"   Previous Topic | Next Topic
nonePrinter-friendly copy    
Conferences MakeBid Auction users addons and fixes Topic #353
Reading page 1 of 1 pages
andnu
Member since Dec-8-09
13 posts, Rate this user
Jun-28-10, 10:45 PM (CST)
Click to add this user to your buddy list  
"Check to see if you are human at New User Registration"
 
   Human Check


Generates 2 sets of numbers to be add for the answer.
New User Registration has to add the 2 numbers to get the answer.

example: 57 + 34 =

************************************
config.pl
## Human Being Check on or off
$config{'humancheck'} = 'on';

*********************************
auction.pl
sub reg
if ($config{'humancheck'} eq "on") {
my ($human1,$human2) = &humanpass();
print <<"EOF";

<TR><TD VALIGN=TOP><B><FONT SIZE=4>Are you a Human Being or Computer Spammer?<font color="red"> TEST</B></font></TD>
<TD><B><font color="red" SIZE=4>$human1 + $human2 = </B></font><INPUT NAME=human3 TYPE="TEXT" SIZE="10"></TD></TR>
<INPUT TYPE=HIDDEN NAME=human1 VALUE=$human1>
<INPUT TYPE=HIDDEN NAME=human2 VALUE=$human2>
EOF

}
print <<"EOF";
*************************************

auction.pl

sub procreg {

if ($config{'humancheck'} eq "on") {
&oops('Oh!!! Not A Human Being Or You Did Not Add Right.') unless ($form{'human1'} + $form{'human2'} == $form{'human3'});
}

************************************
auction.pl make new

sub humanpass {

my $digits;
my $digits2;
for (1..2){ $digits .= (0..9)[int(rand(10))] }
for (1..2){ $digits2 .= (0..9)[int(rand(10))] }
my $randpass .= $digits;
my $randpass2 .= $digits2;
return $randpass,$randpass2;

}

******************
andnu



Attachments
http://www.usanetcreations.com/dcforum/User_files/4c296bdc2aef7689.txt

  Alert | IP Printer-friendly page | Edit | Reply | Reply With Quote
Len click here to view user rating
Member since May-4-04
477 posts, 6 feedbacks, 10 points
Jul-03-10, 05:26 AM (CST)
Click to view user profileClick to add this user to your buddy list  
1. "RE: Check to see if you are human at New User Registration"
 
   Hi andnu
Please can you tell us where to place the code
i.e. where abouts in each section and by or under what lines.

Many thanks for any help
Best Regards
Len


  Alert | IP Printer-friendly page | Edit | Reply | Reply With Quote
shnippy click here to view user rating
Charter Member
493 posts, 2 feedbacks, 4 points
Jul-03-10, 03:20 PM (CST)
Click to add this user to your buddy list  
2. "RE: Check to see if you are human at New User Registration"
 
   nice andnu! looks good mate.

cheers,
shnippy


  Alert | IP Printer-friendly page | Edit | Reply | Reply With Quote
andnu
Member since Dec-8-09
13 posts, Rate this user
Jul-04-10, 01:29 AM (CST)
Click to add this user to your buddy list  
4. "RE: Check to see if you are human at New User Registration"
 
   >Hi andnu
>Please can you tell us where to place the code
>i.e. where abouts in each section and by or under what lines.
>
>Many thanks for any help
>Best Regards
>Len

I will try, my script has changed alot. Do not use the code from this board get the text file that I added above. The board changes code.

************************************
IN config.pl you add this near stuff that looks like this

## Human Being Check on or off
$config{'humancheck'} = 'on';


#-#############################################
IN auction.pl
sub reg look for <OPTION VALUE="other">Other</OPTION> and you can see where I added my stuff

<OPTION VALUE="other">Other</OPTION>
</SELECT>
</TD></TR>
<TR><TD VALIGN=TOP><B>If Referred by a registered user:</B><BR>If you were referred by one of our registered<BR> users enter their user alias here!!</TD>
<TD><INPUT NAME="REFNAME" TYPE="TEXT" SIZE="30"></TD></TR>

EOF


if ($config{'humancheck'} eq "on") {
my ($human1,$human2) = &humanpass();
print <<"EOF";

<TR><TD VALIGN=TOP><B><FONT SIZE=4>Are you a Human Being or Computer Spammer?<font color="red"> TEST</B></font></TD>
<TD><B><font color="red" SIZE=4>$human1 + $human2 = </B></font><INPUT NAME=human3 TYPE="TEXT" SIZE="10"></TD></TR>
<INPUT TYPE=HIDDEN NAME=human1 VALUE=$human1>
<INPUT TYPE=HIDDEN NAME=human2 VALUE=$human2>
EOF

}
print <<"EOF";
</TABLE><br>


<CENTER><INPUT TYPE=SUBMIT VALUE="Register Me"></CENTER>
EOF


}
### bottom of sub reg
#-#############################################

IN auction.pl this was added right under sub procreg {. It is the first thing it looks at.

sub procreg {

if ($config{'humancheck'} eq "on") {
&oops('Oh!!! Not A Human Being Or You Did Not Add Right.') unless ($form{'human1'} + $form{'human2'} == $form{'human3'});
}

#-#############################################

IN auction.pl make new at the bottom of your auction.pl above 1;

sub humanpass {

my $digits;
my $digits2;
for (1..2){ $digits .= (0..9) }
for (1..2){ $digits2 .= (0..9) }
my $randpass .= $digits;
my $randpass2 .= $digits2;
return $randpass,$randpass2;

}

#-#############################################
andnu


  Alert | IP Printer-friendly page | Edit | Reply | Reply With Quote
Len click here to view user rating
Member since May-4-04
477 posts, 6 feedbacks, 10 points
Jul-04-10, 05:44 AM (CST)
Click to view user profileClick to add this user to your buddy list  
5. "RE: Check to see if you are human at New User Registration"
 
   Hi andnu
Many thanks for your help
It's much appreciated!

Best Regards
Len


  Alert | IP Printer-friendly page | Edit | Reply | Reply With Quote


Conferences | Topics | Previous Topic | Next Topic
Rate this topic Rate this topic