redarrow Posted March 8, 2013 Share Posted March 8, 2013 (edited) 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.... Edited March 8, 2013 by redarrow Quote Link to comment https://forums.phpfreaks.com/topic/275412-stopping-bots-with-phpare-you-human-a-easy-idea/ Share on other sites More sharing options...
Jessica Posted March 8, 2013 Share Posted March 8, 2013 The best way I've found is to have a hidden input with an obvious name like "comments" or "message". If it IS filled in, that's a bot. Quote Link to comment https://forums.phpfreaks.com/topic/275412-stopping-bots-with-phpare-you-human-a-easy-idea/#findComment-1417530 Share on other sites More sharing options...
Psycho Posted March 8, 2013 Share Posted March 8, 2013 (edited) Why is this post in PHP Help? Your post makes absolutely no sense. You apparently have an idea in your head, but you failed in trying to convey that idea. If you are going post something that you want ta response to, at least take the time to actually understand what you are posting. $num1=ROUND(1,5), $num2=ROUND(1,5), Aside from the fact that you couldn't be bothered with writing simple code without syntax errors, it appears you do not know what ROUND() does. I really have no clue what your proposal is because you make no sense. But, it seems you will display some number(s) to the user and expect them to click certain checkboxes. And, that would work. But, here's the catch. There are hundreds of "simple" solutions such as that which will work. They will work because they are not common. If that process was to become common place OR if someone specifically wanted to hack your site, internet miscreants would be able to throw together a script to circumvent that process in a few minutes. Even Jessica's solution could be very easily circumvented. But, as long as it is not a common preventative measure and your site is not being specifically targeted it will work. One that I have used in the past is an onclick event in the textarea of a form to populate a hidden field (which gets checked on the receiving page). Just like Jessica's solution, this requires no additional work by the user. In 99% of cases they will click in that field to enter their response. If the user doesn't click it would let them know. Captcha's have been a "good" solution that can be easily implemented as a standard. But, the problem is that OCR readers have gotten better and better to the point where I can't even understand what characters are in the freakin image. So, I thin there does need to be a new standard. But, the solutions we are proposing will not work as a standard. Edited March 8, 2013 by Psycho Quote Link to comment https://forums.phpfreaks.com/topic/275412-stopping-bots-with-phpare-you-human-a-easy-idea/#findComment-1417534 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.