Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

stopping bots with php,are you human a easy idea.

$
0
0

database connection.

 

I was thinking  how  to stop bots and  stop people useing  a decaptcher.

 

my fort is to use clickbox's with a form and two random numbers, the random numbrers will tell you what

box to keep checked.

 

if($_POST['submit']){

 

 

$num1=$_POST['num1'];;

$num2=$_POST[''num2'];

 

databse select to se if the number checked is also the number in the database.

 

while loop with  ,data mysql_fetch_assocc

 

if($num1 ==$data['num1'] and $num2==data['num2']){

 

send them to correct page via header redirect i suppose.

 

$num1=ROUND(1,5),

$num2=ROUND(1,5),

 

Database update with 2 colums id,num1,num2 defualt  is zero's for num1 and num2 in the database, id is auto increment.

 

Every time a person post to the database  it updates  2 numbers random from Round function,

the numbers will enter as random from 1 to 4 only.

 

if post checkbox varables.

 

$box_a=$_POST['box_a''];

$box_b=$_POST['box_b''];

$box_c=$_POST['box_c'];

$box_d=$_POST['box_d'];

 

 

get the database info, to show what two numbers to

check the checkbox from the databese.

 

it be 1 to 4 only but twice, your need to check two checkboxs, random was done twice.

 

 

the value from the databse will have to be the value of the ordered check boxs.

from 1 to 4.

 

<form method="POST" action=" ">

 

<input type="checkbox" name="box_a" value="1">

<input type="checkbox" name="box_b" value="2">

<input type="checkbox" name="box_c" value="3">

<input type="checkbox" name="box_d" value="4">

 

<input type="submit" name="sumit">

 

</form>

 

}

 

as you can see a little project just asking is it better then using written number and letter capcha....


Viewing all articles
Browse latest Browse all 13200

Trending Articles